1. James Taylor
  2. bx-python

Commits

James Taylor  committed 7c51a66

Adding generated C files

  • Participants
  • Parent commits 1ccb292
  • Branches default

Comments (0)

Files changed (3)

File lib/bx/bbi/bbi_file.c

View file
+/* Generated by Cython 0.13 on Sun Sep 26 13:52:45 2010 */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#else
+
+#include <stddef.h> /* For offsetof */
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+  #define METH_COEXIST 0
+  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
+  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
+#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 PyInt_FromSsize_t(z) PyInt_FromLong(z)
+  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
+  #define PyNumber_Index(o)    PyNumber_Int(o)
+  #define PyIndex_Check(o)     PyNumber_Check(o)
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
+#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)
+
+#endif
+
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#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_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
+  #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
+
+#if PY_MAJOR_VERSION >= 3
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject PyLongObject
+#endif
+
+
+#if PY_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
+
+#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
+
+#ifdef __cplusplus
+#define __PYX_EXTERN_C extern "C"
+#else
+#define __PYX_EXTERN_C extern
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE_API__bx__bbi__bbi_file
+
+/* inline attribute */
+#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
+
+/* unused attribute */
+#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)
+#   define CYTHON_UNUSED __attribute__ ((__unused__)) 
+# else
+#   define CYTHON_UNUSED 
+# endif
+#endif
+
+typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+
+/* Type Conversion Predeclarations */
+
+#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
+#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
+
+#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*);
+
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+
+
+#ifdef __GNUC__
+/* Test for GCC > 2.95 */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
+#define likely(x)   __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* __GNUC__ > 2 ... */
+#define likely(x)   (x)
+#define unlikely(x) (x)
+#endif /* __GNUC__ > 2 ... */
+#else /* __GNUC__ */
+#define likely(x)   (x)
+#define unlikely(x) (x)
+#endif /* __GNUC__ */
+    
+static PyObject *__pyx_m;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+  "bbi_file.pyx",
+  "bpt_file.pxd",
+  "cirtree_file.pxd",
+};
+
+typedef unsigned char __pyx_t_2bx_3bbi_5types_UBYTE;
+
+typedef signed char __pyx_t_2bx_3bbi_5types_BYTE;
+
+typedef unsigned short __pyx_t_2bx_3bbi_5types_UWORD;
+
+typedef short __pyx_t_2bx_3bbi_5types_WORD;
+
+typedef unsigned PY_LONG_LONG __pyx_t_2bx_3bbi_5types_bits64;
+
+typedef unsigned int __pyx_t_2bx_3bbi_5types_bits32;
+
+typedef unsigned short __pyx_t_2bx_3bbi_5types_bits16;
+
+typedef unsigned char __pyx_t_2bx_3bbi_5types_bits8;
+
+typedef int __pyx_t_2bx_3bbi_5types_signed32;
+
+typedef int __pyx_t_2bx_3bbi_5types_boolean;
+
+/* Type declarations */
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":176
+ * # Skipping 'struct bbiChromUsage'
+ * 
+ * cdef enum summary_type:             # <<<<<<<<<<<<<<
+ *     mean = 0
+ *     max = 1
+ */
+
+enum __pyx_t_2bx_3bbi_8bbi_file_summary_type {
+  __pyx_e_2bx_3bbi_8bbi_file_mean = 0,
+  __pyx_e_2bx_3bbi_8bbi_file_max = 1,
+  __pyx_e_2bx_3bbi_8bbi_file_min = 2,
+  __pyx_e_2bx_3bbi_8bbi_file_coverage = 3,
+  __pyx_e_2bx_3bbi_8bbi_file_sd = 4
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":198
+ *     cdef double val
+ * 
+ * cdef class SummaryElement:             # <<<<<<<<<<<<<<
+ *     cdef bits64 valid_count
+ *     cdef double min_val
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_SummaryElement {
+  PyObject_HEAD
+  __pyx_t_2bx_3bbi_5types_bits64 valid_count;
+  double min_val;
+  double max_val;
+  double sum_data;
+  double sum_squares;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":193
+ *     cdef public float sum_squares
+ * 
+ * cdef class Interval:             # <<<<<<<<<<<<<<
+ *     cdef bits32 start
+ *     cdef bits32 end
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_Interval {
+  PyObject_HEAD
+  __pyx_t_2bx_3bbi_5types_bits32 start;
+  __pyx_t_2bx_3bbi_5types_bits32 end;
+  double val;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/cirtree_file.pxd":3
+ * from types cimport *
+ * 
+ * cdef class CIRTreeFile:             # <<<<<<<<<<<<<<
+ *     cdef object file
+ *     cdef object reader
+ */
+
+struct __pyx_obj_2bx_3bbi_12cirtree_file_CIRTreeFile {
+  PyObject_HEAD
+  PyObject *file;
+  PyObject *reader;
+  __pyx_t_2bx_3bbi_5types_bits64 root_offset;
+  __pyx_t_2bx_3bbi_5types_bits32 block_size;
+  __pyx_t_2bx_3bbi_5types_bits64 item_count;
+  __pyx_t_2bx_3bbi_5types_bits32 start_chrom_ix;
+  __pyx_t_2bx_3bbi_5types_bits32 start_base;
+  __pyx_t_2bx_3bbi_5types_bits32 end_chrom_ix;
+  __pyx_t_2bx_3bbi_5types_bits32 end_base;
+  __pyx_t_2bx_3bbi_5types_bits64 file_size;
+  __pyx_t_2bx_3bbi_5types_bits32 items_per_slot;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":117
+ *             return None
+ * 
+ * cdef class ZoomLevel:             # <<<<<<<<<<<<<<
+ *     cdef BBIFile bbi_file
+ *     cdef public bits32 reduction_level
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel {
+  PyObject_HEAD
+  struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *bbi_file;
+  __pyx_t_2bx_3bbi_5types_bits32 reduction_level;
+  __pyx_t_2bx_3bbi_5types_bits32 reserved;
+  __pyx_t_2bx_3bbi_5types_bits64 data_offset;
+  __pyx_t_2bx_3bbi_5types_bits64 index_offset;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bpt_file.pxd":5
+ * from types cimport *
+ * 
+ * cdef class BPTFile:             # <<<<<<<<<<<<<<
+ *     """
+ *     On disk B+ tree compatible with Jim Kent's bPlusTree.c
+ */
+
+struct __pyx_obj_2bx_3bbi_8bpt_file_BPTFile {
+  PyObject_HEAD
+  PyObject *file;
+  PyObject *reader;
+  __pyx_t_2bx_3bbi_5types_boolean is_byteswapped;
+  __pyx_t_2bx_3bbi_5types_bits32 block_size;
+  __pyx_t_2bx_3bbi_5types_bits32 key_size;
+  __pyx_t_2bx_3bbi_5types_bits32 value_size;
+  __pyx_t_2bx_3bbi_5types_bits64 item_count;
+  __pyx_t_2bx_3bbi_5types_bits64 root_offset;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":183
+ *     sd = 4
+ * 
+ * cdef class Summary:             # <<<<<<<<<<<<<<
+ *     cdef public bits32 chrom_id
+ *     cdef public bits32 start
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_Summary {
+  PyObject_HEAD
+  __pyx_t_2bx_3bbi_5types_bits32 chrom_id;
+  __pyx_t_2bx_3bbi_5types_bits32 start;
+  __pyx_t_2bx_3bbi_5types_bits32 end;
+  __pyx_t_2bx_3bbi_5types_bits32 valid_count;
+  float min_val;
+  float max_val;
+  float sum_data;
+  float sum_squares;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":24
+ * DEF summary_on_disk_size = 32
+ * 
+ * cdef class BBIFile:             # <<<<<<<<<<<<<<
+ *     """
+ *     A "big binary indexed" file. Stores blocks of raw data and numeric
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile {
+  PyObject_HEAD
+  PyObject *file;
+  PyObject *reader;
+  __pyx_t_2bx_3bbi_5types_bits32 magic;
+  __pyx_t_2bx_3bbi_5types_boolean is_byteswapped;
+  struct __pyx_obj_2bx_3bbi_8bpt_file_BPTFile *chrom_bpt;
+  __pyx_t_2bx_3bbi_5types_bits16 version;
+  __pyx_t_2bx_3bbi_5types_bits16 zoom_levels;
+  __pyx_t_2bx_3bbi_5types_bits64 chrom_tree_offset;
+  __pyx_t_2bx_3bbi_5types_bits64 unzoomed_data_offset;
+  __pyx_t_2bx_3bbi_5types_bits64 unzoomed_index_offset;
+  __pyx_t_2bx_3bbi_5types_bits16 field_count;
+  __pyx_t_2bx_3bbi_5types_bits16 defined_field_count;
+  __pyx_t_2bx_3bbi_5types_bits64 as_offset;
+  __pyx_t_2bx_3bbi_5types_bits64 total_summary_offset;
+  __pyx_t_2bx_3bbi_5types_bits32 uncompress_buf_size;
+  struct __pyx_obj_2bx_3bbi_12cirtree_file_CIRTreeFile *unzoomed_cir;
+  PyObject *level_list;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":169
+ *     cdef bits32 chrom_size
+ * 
+ * cdef class ChromInfo:             # <<<<<<<<<<<<<<
+ *     cdef object name
+ *     cdef bits32 id
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_ChromInfo {
+  PyObject_HEAD
+  PyObject *name;
+  __pyx_t_2bx_3bbi_5types_bits32 id;
+  __pyx_t_2bx_3bbi_5types_bits32 size;
+};
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":165
+ * 
+ * 
+ * cdef class ChromIDSize:             # <<<<<<<<<<<<<<
+ *     cdef bits32 chrom_id
+ *     cdef bits32 chrom_size
+ */
+
+struct __pyx_obj_2bx_3bbi_8bbi_file_ChromIDSize {
+  PyObject_HEAD
+  __pyx_t_2bx_3bbi_5types_bits32 chrom_id;
+  __pyx_t_2bx_3bbi_5types_bits32 chrom_size;
+};
+
+#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) {
+    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;
+  }
+  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+  #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_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
+#else
+  #define __Pyx_RefNannySetupContext(name)
+  #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_XDECREF(r) Py_XDECREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
+#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name, PyObject* kw_name); /*proto*/
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (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 CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
+static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
+
+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 PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
+
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
+
+static void __Pyx_AddTraceback(const char *funcname); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+/* Module declarations from bx.bbi.types */
+
+/* Module declarations from bx.bbi.bpt_file */
+
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bpt_file_BPTFile = 0;
+/* Module declarations from bx.bbi.cirtree_file */
+
+static PyTypeObject *__pyx_ptype_2bx_3bbi_12cirtree_file_CIRTreeFile = 0;
+/* Module declarations from bx.bbi.bbi_file */
+
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_BBIFile = 0;
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_ZoomLevel = 0;
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_ChromIDSize = 0;
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_ChromInfo = 0;
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_Summary = 0;
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_Interval = 0;
+static PyTypeObject *__pyx_ptype_2bx_3bbi_8bbi_file_SummaryElement = 0;
+#define __Pyx_MODULE_NAME "bx.bbi.bbi_file"
+int __pyx_module_is_main_bx__bbi__bbi_file = 0;
+
+/* Implementation of bx.bbi.bbi_file */
+static char __pyx_k_1[] = "unzoomed_data_offset";
+static char __pyx_k_2[] = "unzoomed_index_offset";
+static char __pyx_k_3[] = "total_summary_offset";
+static char __pyx_k_4[] = "find_overlapping_blocks";
+static char __pyx_k_5[] = "\nCore implementation for reading UCSC \"big binary indexed\" files.\n\nThere isn't really any specification for the format beyond the code, so this\nmirrors Jim Kent's 'bbiRead.c' mostly. \n";
+static char __pyx_k_6[] = "bx.misc.binary_file";
+static char __pyx_k_7[] = "BBIFile.open (line 68)";
+static char __pyx_k_8[] = "BBIFile._get_chrom_id_and_size (line 105)";
+static char __pyx_k_9[] = "_get_chrom_id_and_size";
+static char __pyx_k__II[] = "II";
+static char __pyx_k__end[] = "end";
+static char __pyx_k__file[] = "file";
+static char __pyx_k__find[] = "find";
+static char __pyx_k__open[] = "open";
+static char __pyx_k__read[] = "read";
+static char __pyx_k__seek[] = "seek";
+static char __pyx_k__zlib[] = "zlib";
+static char __pyx_k__magic[] = "magic";
+static char __pyx_k__start[] = "start";
+static char __pyx_k__reader[] = "reader";
+static char __pyx_k__unpack[] = "unpack";
+static char __pyx_k__BBIFile[] = "BBIFile";
+static char __pyx_k__max_val[] = "max_val";
+static char __pyx_k__min_val[] = "min_val";
+static char __pyx_k__version[] = "version";
+static char __pyx_k__StringIO[] = "StringIO";
+static char __pyx_k____main__[] = "__main__";
+static char __pyx_k____test__[] = "__test__";
+static char __pyx_k__bbi_file[] = "bbi_file";
+static char __pyx_k__chrom_id[] = "chrom_id";
+static char __pyx_k__reserved[] = "reserved";
+static char __pyx_k__sum_data[] = "sum_data";
+static char __pyx_k__as_offset[] = "as_offset";
+static char __pyx_k__cStringIO[] = "cStringIO";
+static char __pyx_k__chrom_bpt[] = "chrom_bpt";
+static char __pyx_k__type_name[] = "type_name";
+static char __pyx_k__decompress[] = "decompress";
+static char __pyx_k__level_list[] = "level_list";
+static char __pyx_k__read_float[] = "read_float";
+static char __pyx_k__data_offset[] = "data_offset";
+static char __pyx_k__field_count[] = "field_count";
+static char __pyx_k__read_uint16[] = "read_uint16";
+static char __pyx_k__read_uint32[] = "read_uint32";
+static char __pyx_k__read_uint64[] = "read_uint64";
+static char __pyx_k__sum_squares[] = "sum_squares";
+static char __pyx_k__valid_count[] = "valid_count";
+static char __pyx_k__zoom_levels[] = "zoom_levels";
+static char __pyx_k__expected_sig[] = "expected_sig";
+static char __pyx_k__index_offset[] = "index_offset";
+static char __pyx_k__is_byteswapped[] = "is_byteswapped";
+static char __pyx_k__byteswap_needed[] = "byteswap_needed";
+static char __pyx_k__reduction_level[] = "reduction_level";
+static char __pyx_k__BinaryFileReader[] = "BinaryFileReader";
+static char __pyx_k__is_little_endian[] = "is_little_endian";
+static char __pyx_k__chrom_tree_offset[] = "chrom_tree_offset";
+static char __pyx_k__defined_field_count[] = "defined_field_count";
+static char __pyx_k__uncompress_buf_size[] = "uncompress_buf_size";
+static PyObject *__pyx_n_s_1;
+static PyObject *__pyx_n_s_2;
+static PyObject *__pyx_n_s_3;
+static PyObject *__pyx_n_s_4;
+static PyObject *__pyx_n_s_6;
+static PyObject *__pyx_kp_u_7;
+static PyObject *__pyx_kp_u_8;
+static PyObject *__pyx_n_s_9;
+static PyObject *__pyx_n_s__BBIFile;
+static PyObject *__pyx_n_s__BinaryFileReader;
+static PyObject *__pyx_n_s__II;
+static PyObject *__pyx_n_s__StringIO;
+static PyObject *__pyx_n_s____main__;
+static PyObject *__pyx_n_s____test__;
+static PyObject *__pyx_n_s__as_offset;
+static PyObject *__pyx_n_s__bbi_file;
+static PyObject *__pyx_n_s__byteswap_needed;
+static PyObject *__pyx_n_s__cStringIO;
+static PyObject *__pyx_n_s__chrom_bpt;
+static PyObject *__pyx_n_s__chrom_id;
+static PyObject *__pyx_n_s__chrom_tree_offset;
+static PyObject *__pyx_n_s__data_offset;
+static PyObject *__pyx_n_s__decompress;
+static PyObject *__pyx_n_s__defined_field_count;
+static PyObject *__pyx_n_s__end;
+static PyObject *__pyx_n_s__expected_sig;
+static PyObject *__pyx_n_s__field_count;
+static PyObject *__pyx_n_s__file;
+static PyObject *__pyx_n_s__find;
+static PyObject *__pyx_n_s__index_offset;
+static PyObject *__pyx_n_s__is_byteswapped;
+static PyObject *__pyx_n_s__is_little_endian;
+static PyObject *__pyx_n_s__level_list;
+static PyObject *__pyx_n_s__magic;
+static PyObject *__pyx_n_s__max_val;
+static PyObject *__pyx_n_s__min_val;
+static PyObject *__pyx_n_s__open;
+static PyObject *__pyx_n_s__read;
+static PyObject *__pyx_n_s__read_float;
+static PyObject *__pyx_n_s__read_uint16;
+static PyObject *__pyx_n_s__read_uint32;
+static PyObject *__pyx_n_s__read_uint64;
+static PyObject *__pyx_n_s__reader;
+static PyObject *__pyx_n_s__reduction_level;
+static PyObject *__pyx_n_s__reserved;
+static PyObject *__pyx_n_s__seek;
+static PyObject *__pyx_n_s__start;
+static PyObject *__pyx_n_s__sum_data;
+static PyObject *__pyx_n_s__sum_squares;
+static PyObject *__pyx_n_s__type_name;
+static PyObject *__pyx_n_s__uncompress_buf_size;
+static PyObject *__pyx_n_s__unpack;
+static PyObject *__pyx_n_s__valid_count;
+static PyObject *__pyx_n_s__version;
+static PyObject *__pyx_n_s__zlib;
+static PyObject *__pyx_n_s__zoom_levels;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_32;
+static PyObject *__pyx_int_64;
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":35
+ *     cdef object reader
+ *     # The magic number or type signature (whether the file is bigWig or bigBed or...)
+ *     cdef public bits32 magic             # <<<<<<<<<<<<<<
+ *     # Is the file byteswapped relative to our native byte order?
+ *     cdef boolean is_byteswapped
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_5magic___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_5magic___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->magic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __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("bx.bbi.bbi_file.BBIFile.magic.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_5magic___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_5magic___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_t_1;
+  __Pyx_RefNannySetupContext("__set__");
+  __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->magic = __pyx_t_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.magic.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":41
+ *     cdef BPTFile chrom_bpt
+ *     # Version number
+ *     cdef public bits16 version             # <<<<<<<<<<<<<<
+ *     # Number of zoom levels
+ *     cdef public bits16 zoom_levels
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_7version___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_7version___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __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("bx.bbi.bbi_file.BBIFile.version.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_7version___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_7version___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __pyx_t_2bx_3bbi_5types_bits16 __pyx_t_1;
+  __Pyx_RefNannySetupContext("__set__");
+  __pyx_t_1 = __Pyx_PyInt_AsUnsignedShort(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->version = __pyx_t_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.version.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":43
+ *     cdef public bits16 version
+ *     # Number of zoom levels
+ *     cdef public bits16 zoom_levels             # <<<<<<<<<<<<<<
+ *     # Offset to chromosome index
+ *     cdef bits64 chrom_tree_offset
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_11zoom_levels___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_11zoom_levels___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->zoom_levels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __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("bx.bbi.bbi_file.BBIFile.zoom_levels.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_11zoom_levels___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_11zoom_levels___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __pyx_t_2bx_3bbi_5types_bits16 __pyx_t_1;
+  __Pyx_RefNannySetupContext("__set__");
+  __pyx_t_1 = __Pyx_PyInt_AsUnsignedShort(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->zoom_levels = __pyx_t_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.zoom_levels.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":62
+ *     cdef CIRTreeFile unzoomed_cir
+ *     # Zoom levels list
+ *     cdef public object level_list             # <<<<<<<<<<<<<<
+ * 
+ *     def __init__( self, file=None, expected_sig=None, type_name=None ):
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_10level_list___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_10level_list___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  __pyx_r = ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_10level_list___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_10level_list___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannySetupContext("__set__");
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  __Pyx_DECREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list = __pyx_v_value;
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_10level_list___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_10level_list___del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannySetupContext("__del__");
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  __Pyx_DECREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list = Py_None;
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":64
+ *     cdef public object level_list
+ * 
+ *     def __init__( self, file=None, expected_sig=None, type_name=None ):             # <<<<<<<<<<<<<<
+ *         if file is not None:
+ *             self.open( file, expected_sig, type_name )
+ */
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_7BBIFile___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_file = 0;
+  PyObject *__pyx_v_expected_sig = 0;
+  PyObject *__pyx_v_type_name = 0;
+  int __pyx_r;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__file,&__pyx_n_s__expected_sig,&__pyx_n_s__type_name,0};
+  __Pyx_RefNannySetupContext("__init__");
+  if (unlikely(__pyx_kwds)) {
+    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+    PyObject* values[3] = {0,0,0};
+    values[0] = ((PyObject *)Py_None);
+    values[1] = ((PyObject *)Py_None);
+    values[2] = ((PyObject *)Py_None);
+    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);
+      case  0: break;
+      default: goto __pyx_L5_argtuple_error;
+    }
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  0:
+      if (kw_args > 0) {
+        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__file);
+        if (value) { values[0] = value; kw_args--; }
+      }
+      case  1:
+      if (kw_args > 0) {
+        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__expected_sig);
+        if (value) { values[1] = value; kw_args--; }
+      }
+      case  2:
+      if (kw_args > 0) {
+        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__type_name);
+        if (value) { values[2] = value; kw_args--; }
+      }
+    }
+    if (unlikely(kw_args > 0)) {
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    }
+    __pyx_v_file = values[0];
+    __pyx_v_expected_sig = values[1];
+    __pyx_v_type_name = values[2];
+  } else {
+    __pyx_v_file = ((PyObject *)Py_None);
+    __pyx_v_expected_sig = ((PyObject *)Py_None);
+    __pyx_v_type_name = ((PyObject *)Py_None);
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  3: __pyx_v_type_name = PyTuple_GET_ITEM(__pyx_args, 2);
+      case  2: __pyx_v_expected_sig = PyTuple_GET_ITEM(__pyx_args, 1);
+      case  1: __pyx_v_file = PyTuple_GET_ITEM(__pyx_args, 0);
+      case  0: break;
+      default: goto __pyx_L5_argtuple_error;
+    }
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.__init__");
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":65
+ * 
+ *     def __init__( self, file=None, expected_sig=None, type_name=None ):
+ *         if file is not None:             # <<<<<<<<<<<<<<
+ *             self.open( file, expected_sig, type_name )
+ * 
+ */
+  __pyx_t_1 = (__pyx_v_file != Py_None);
+  if (__pyx_t_1) {
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":66
+ *     def __init__( self, file=None, expected_sig=None, type_name=None ):
+ *         if file is not None:
+ *             self.open( file, expected_sig, type_name )             # <<<<<<<<<<<<<<
+ * 
+ *     def open( self, file, expected_sig, type_name ):
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyTuple_New(3); 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_INCREF(__pyx_v_file);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_file);
+    __Pyx_GIVEREF(__pyx_v_file);
+    __Pyx_INCREF(__pyx_v_expected_sig);
+    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_expected_sig);
+    __Pyx_GIVEREF(__pyx_v_expected_sig);
+    __Pyx_INCREF(__pyx_v_type_name);
+    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_type_name);
+    __Pyx_GIVEREF(__pyx_v_type_name);
+    __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, 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_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.__init__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":68
+ *             self.open( file, expected_sig, type_name )
+ * 
+ *     def open( self, file, expected_sig, type_name ):             # <<<<<<<<<<<<<<
+ *         """
+ *         Initialize from an existing bbi file, signature (magic) must be passed
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_2bx_3bbi_8bbi_file_7BBIFile_open[] = "\n        Initialize from an existing bbi file, signature (magic) must be passed\n        in since this is generic. \n        ";
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_file = 0;
+  PyObject *__pyx_v_expected_sig = 0;
+  PyObject *__pyx_v_type_name = 0;
+  PyObject *__pyx_v_reader;
+  long __pyx_v_i;
+  struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *__pyx_v_level;
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_t_4;
+  __pyx_t_2bx_3bbi_5types_boolean __pyx_t_5;
+  __pyx_t_2bx_3bbi_5types_bits16 __pyx_t_6;
+  __pyx_t_2bx_3bbi_5types_bits64 __pyx_t_7;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__file,&__pyx_n_s__expected_sig,&__pyx_n_s__type_name,0};
+  __Pyx_RefNannySetupContext("open");
+  if (unlikely(__pyx_kwds)) {
+    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+    PyObject* values[3] = {0,0,0};
+    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);
+      case  0: break;
+      default: goto __pyx_L5_argtuple_error;
+    }
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  0:
+      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__file);
+      if (likely(values[0])) kw_args--;
+      else goto __pyx_L5_argtuple_error;
+      case  1:
+      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__expected_sig);
+      if (likely(values[1])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("open", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+      case  2:
+      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__type_name);
+      if (likely(values[2])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("open", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    }
+    if (unlikely(kw_args > 0)) {
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    }
+    __pyx_v_file = values[0];
+    __pyx_v_expected_sig = values[1];
+    __pyx_v_type_name = values[2];
+  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+    goto __pyx_L5_argtuple_error;
+  } else {
+    __pyx_v_file = PyTuple_GET_ITEM(__pyx_args, 0);
+    __pyx_v_expected_sig = PyTuple_GET_ITEM(__pyx_args, 1);
+    __pyx_v_type_name = PyTuple_GET_ITEM(__pyx_args, 2);
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("open", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.open");
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_v_reader = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)Py_None); __Pyx_INCREF(Py_None);
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":73
+ *         in since this is generic.
+ *         """
+ *         self.file = file             # <<<<<<<<<<<<<<
+ *         # Open the file in a BinaryFileReader, handles magic and byteswapping
+ *         self.reader = reader = BinaryFileReader( file, expected_sig )
+ */
+  __Pyx_INCREF(__pyx_v_file);
+  __Pyx_GIVEREF(__pyx_v_file);
+  __Pyx_GOTREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->file);
+  __Pyx_DECREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->file);
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->file = __pyx_v_file;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":75
+ *         self.file = file
+ *         # Open the file in a BinaryFileReader, handles magic and byteswapping
+ *         self.reader = reader = BinaryFileReader( file, expected_sig )             # <<<<<<<<<<<<<<
+ *         self.magic = expected_sig
+ *         self.is_byteswapped = self.reader.byteswap_needed
+ */
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BinaryFileReader); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyTuple_New(2); 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_INCREF(__pyx_v_file);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_file);
+  __Pyx_GIVEREF(__pyx_v_file);
+  __Pyx_INCREF(__pyx_v_expected_sig);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_expected_sig);
+  __Pyx_GIVEREF(__pyx_v_expected_sig);
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_INCREF(__pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __Pyx_GOTREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->reader);
+  __Pyx_DECREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->reader);
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->reader = __pyx_t_3;
+  __Pyx_INCREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_v_reader);
+  __pyx_v_reader = __pyx_t_3;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":76
+ *         # Open the file in a BinaryFileReader, handles magic and byteswapping
+ *         self.reader = reader = BinaryFileReader( file, expected_sig )
+ *         self.magic = expected_sig             # <<<<<<<<<<<<<<
+ *         self.is_byteswapped = self.reader.byteswap_needed
+ *         # Read header stuff
+ */
+  __pyx_t_4 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_expected_sig); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->magic = __pyx_t_4;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":77
+ *         self.reader = reader = BinaryFileReader( file, expected_sig )
+ *         self.magic = expected_sig
+ *         self.is_byteswapped = self.reader.byteswap_needed             # <<<<<<<<<<<<<<
+ *         # Read header stuff
+ *         self.version = reader.read_uint16()
+ */
+  __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->reader, __pyx_n_s__byteswap_needed); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->is_byteswapped = __pyx_t_5;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":79
+ *         self.is_byteswapped = self.reader.byteswap_needed
+ *         # Read header stuff
+ *         self.version = reader.read_uint16()             # <<<<<<<<<<<<<<
+ *         self.zoom_levels = reader.read_uint16()
+ *         self.chrom_tree_offset = reader.read_uint64()
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_6 = __Pyx_PyInt_AsUnsignedShort(__pyx_t_2); if (unlikely((__pyx_t_6 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->version = __pyx_t_6;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":80
+ *         # Read header stuff
+ *         self.version = reader.read_uint16()
+ *         self.zoom_levels = reader.read_uint16()             # <<<<<<<<<<<<<<
+ *         self.chrom_tree_offset = reader.read_uint64()
+ *         self.unzoomed_data_offset = reader.read_uint64()
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); 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_t_6 = __Pyx_PyInt_AsUnsignedShort(__pyx_t_3); if (unlikely((__pyx_t_6 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->zoom_levels = __pyx_t_6;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":81
+ *         self.version = reader.read_uint16()
+ *         self.zoom_levels = reader.read_uint16()
+ *         self.chrom_tree_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *         self.unzoomed_data_offset = reader.read_uint64()
+ *         self.unzoomed_index_offset = reader.read_uint64()
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_2); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_tree_offset = __pyx_t_7;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":82
+ *         self.zoom_levels = reader.read_uint16()
+ *         self.chrom_tree_offset = reader.read_uint64()
+ *         self.unzoomed_data_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *         self.unzoomed_index_offset = reader.read_uint64()
+ *         self.field_count = reader.read_uint16()
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); 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_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->unzoomed_data_offset = __pyx_t_7;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":83
+ *         self.chrom_tree_offset = reader.read_uint64()
+ *         self.unzoomed_data_offset = reader.read_uint64()
+ *         self.unzoomed_index_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *         self.field_count = reader.read_uint16()
+ *         self.defined_field_count = reader.read_uint16()
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); 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_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_2); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->unzoomed_index_offset = __pyx_t_7;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":84
+ *         self.unzoomed_data_offset = reader.read_uint64()
+ *         self.unzoomed_index_offset = reader.read_uint64()
+ *         self.field_count = reader.read_uint16()             # <<<<<<<<<<<<<<
+ *         self.defined_field_count = reader.read_uint16()
+ *         self.as_offset = reader.read_uint64()
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __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 = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_6 = __Pyx_PyInt_AsUnsignedShort(__pyx_t_3); if (unlikely((__pyx_t_6 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->field_count = __pyx_t_6;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":85
+ *         self.unzoomed_index_offset = reader.read_uint64()
+ *         self.field_count = reader.read_uint16()
+ *         self.defined_field_count = reader.read_uint16()             # <<<<<<<<<<<<<<
+ *         self.as_offset = reader.read_uint64()
+ *         self.total_summary_offset = reader.read_uint64()
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_6 = __Pyx_PyInt_AsUnsignedShort(__pyx_t_2); if (unlikely((__pyx_t_6 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->defined_field_count = __pyx_t_6;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":86
+ *         self.field_count = reader.read_uint16()
+ *         self.defined_field_count = reader.read_uint16()
+ *         self.as_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *         self.total_summary_offset = reader.read_uint64()
+ *         self.uncompress_buf_size = reader.read_uint32()
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->as_offset = __pyx_t_7;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":87
+ *         self.defined_field_count = reader.read_uint16()
+ *         self.as_offset = reader.read_uint64()
+ *         self.total_summary_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *         self.uncompress_buf_size = reader.read_uint32()
+ *         # Skip reserved
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); 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_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); 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_3); __pyx_t_3 = 0;
+  __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_2); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->total_summary_offset = __pyx_t_7;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":88
+ *         self.as_offset = reader.read_uint64()
+ *         self.total_summary_offset = reader.read_uint64()
+ *         self.uncompress_buf_size = reader.read_uint32()             # <<<<<<<<<<<<<<
+ *         # Skip reserved
+ *         reader.seek( 64 )
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->uncompress_buf_size = __pyx_t_4;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":90
+ *         self.uncompress_buf_size = reader.read_uint32()
+ *         # Skip reserved
+ *         reader.seek( 64 )             # <<<<<<<<<<<<<<
+ *         # Read zoom headers
+ *         self.level_list = []
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__seek); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyTuple_New(1); 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_INCREF(__pyx_int_64);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_64);
+  __Pyx_GIVEREF(__pyx_int_64);
+  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); 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_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":92
+ *         reader.seek( 64 )
+ *         # Read zoom headers
+ *         self.level_list = []             # <<<<<<<<<<<<<<
+ *         for i from 0 <= i < self.zoom_levels:
+ *             level = ZoomLevel()
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __Pyx_GOTREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  __Pyx_DECREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list);
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":93
+ *         # Read zoom headers
+ *         self.level_list = []
+ *         for i from 0 <= i < self.zoom_levels:             # <<<<<<<<<<<<<<
+ *             level = ZoomLevel()
+ *             level.bbi_file = self
+ */
+  __pyx_t_6 = ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->zoom_levels;
+  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":94
+ *         self.level_list = []
+ *         for i from 0 <= i < self.zoom_levels:
+ *             level = ZoomLevel()             # <<<<<<<<<<<<<<
+ *             level.bbi_file = self
+ *             level.reduction_level = reader.read_uint32()
+ */
+    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_3bbi_8bbi_file_ZoomLevel)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(((PyObject *)__pyx_v_level));
+    __pyx_v_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":95
+ *         for i from 0 <= i < self.zoom_levels:
+ *             level = ZoomLevel()
+ *             level.bbi_file = self             # <<<<<<<<<<<<<<
+ *             level.reduction_level = reader.read_uint32()
+ *             level.reserved = reader.read_uint32()
+ */
+    __Pyx_INCREF(__pyx_v_self);
+    __Pyx_GIVEREF(__pyx_v_self);
+    __Pyx_GOTREF(__pyx_v_level->bbi_file);
+    __Pyx_DECREF(((PyObject *)__pyx_v_level->bbi_file));
+    __pyx_v_level->bbi_file = ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self);
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":96
+ *             level = ZoomLevel()
+ *             level.bbi_file = self
+ *             level.reduction_level = reader.read_uint32()             # <<<<<<<<<<<<<<
+ *             level.reserved = reader.read_uint32()
+ *             level.data_offset = reader.read_uint64()
+ */
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __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 = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_level->reduction_level = __pyx_t_4;
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":97
+ *             level.bbi_file = self
+ *             level.reduction_level = reader.read_uint32()
+ *             level.reserved = reader.read_uint32()             # <<<<<<<<<<<<<<
+ *             level.data_offset = reader.read_uint64()
+ *             level.index_offset = reader.read_uint64()
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_4 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_level->reserved = __pyx_t_4;
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":98
+ *             level.reduction_level = reader.read_uint32()
+ *             level.reserved = reader.read_uint32()
+ *             level.data_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *             level.index_offset = reader.read_uint64()
+ *             self.level_list.append( level )
+ */
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_2); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_level->data_offset = __pyx_t_7;
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":99
+ *             level.reserved = reader.read_uint32()
+ *             level.data_offset = reader.read_uint64()
+ *             level.index_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
+ *             self.level_list.append( level )
+ *         # Initialize and attach embedded BPTFile containing chromosome names and ids
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read_uint64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_7 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_t_1); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_level->index_offset = __pyx_t_7;
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":100
+ *             level.data_offset = reader.read_uint64()
+ *             level.index_offset = reader.read_uint64()
+ *             self.level_list.append( level )             # <<<<<<<<<<<<<<
+ *         # Initialize and attach embedded BPTFile containing chromosome names and ids
+ *         reader.seek( self.chrom_tree_offset )
+ */
+    __pyx_t_1 = __Pyx_PyObject_Append(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list, ((PyObject *)__pyx_v_level)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":102
+ *             self.level_list.append( level )
+ *         # Initialize and attach embedded BPTFile containing chromosome names and ids
+ *         reader.seek( self.chrom_tree_offset )             # <<<<<<<<<<<<<<
+ *         self.chrom_bpt = BPTFile( file=self.file )
+ * 
+ */
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__seek); 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_t_2 = PyLong_FromUnsignedLongLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_tree_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __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;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":103
+ *         # Initialize and attach embedded BPTFile containing chromosome names and ids
+ *         reader.seek( self.chrom_tree_offset )
+ *         self.chrom_bpt = BPTFile( file=self.file )             # <<<<<<<<<<<<<<
+ * 
+ *     def _get_chrom_id_and_size( self, chrom ):
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__file), ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->file) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_2bx_3bbi_8bpt_file_BPTFile)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_GIVEREF(__pyx_t_3);
+  __Pyx_GOTREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_bpt);
+  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_bpt));
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_bpt = ((struct __pyx_obj_2bx_3bbi_8bpt_file_BPTFile *)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile.open");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(__pyx_v_reader);
+  __Pyx_DECREF((PyObject *)__pyx_v_level);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":105
+ *         self.chrom_bpt = BPTFile( file=self.file )
+ * 
+ *     def _get_chrom_id_and_size( self, chrom ):             # <<<<<<<<<<<<<<
+ *         """
+ *         Lookup id and size from the chromosome named `chrom`
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile__get_chrom_id_and_size(PyObject *__pyx_v_self, PyObject *__pyx_v_chrom); /*proto*/
+static char __pyx_doc_2bx_3bbi_8bbi_file_7BBIFile__get_chrom_id_and_size[] = "\n        Lookup id and size from the chromosome named `chrom`\n        ";
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_7BBIFile__get_chrom_id_and_size(PyObject *__pyx_v_self, PyObject *__pyx_v_chrom) {
+  PyObject *__pyx_v_bytes;
+  PyObject *__pyx_v_chrom_id;
+  PyObject *__pyx_v_chrom_size;
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  __Pyx_RefNannySetupContext("_get_chrom_id_and_size");
+  __pyx_v_bytes = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_chrom_id = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_chrom_size = Py_None; __Pyx_INCREF(Py_None);
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":109
+ *         Lookup id and size from the chromosome named `chrom`
+ *         """
+ *         bytes = self.chrom_bpt.find( chrom )             # <<<<<<<<<<<<<<
+ *         if bytes is not None:
+ *             # The value is two 32 bit uints, use the BPT's reader for checking byteswapping
+ */
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_bpt), __pyx_n_s__find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __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 = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_chrom);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
+  __Pyx_GIVEREF(__pyx_v_chrom);
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_v_bytes);
+  __pyx_v_bytes = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":110
+ *         """
+ *         bytes = self.chrom_bpt.find( chrom )
+ *         if bytes is not None:             # <<<<<<<<<<<<<<
+ *             # The value is two 32 bit uints, use the BPT's reader for checking byteswapping
+ *             chrom_id, chrom_size = self.chrom_bpt.reader.unpack( "II", bytes )
+ */
+  __pyx_t_4 = (__pyx_v_bytes != Py_None);
+  if (__pyx_t_4) {
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":112
+ *         if bytes is not None:
+ *             # The value is two 32 bit uints, use the BPT's reader for checking byteswapping
+ *             chrom_id, chrom_size = self.chrom_bpt.reader.unpack( "II", bytes )             # <<<<<<<<<<<<<<
+ *             return chrom_id, chrom_size
+ *         else:
+ */
+    __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_bpt->reader, __pyx_n_s__unpack); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __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 = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(((PyObject *)__pyx_n_s__II));
+    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__II));
+    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__II));
+    __Pyx_INCREF(__pyx_v_bytes);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_bytes);
+    __Pyx_GIVEREF(__pyx_v_bytes);
+    __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
+      PyObject* tuple = __pyx_t_1;
+      __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
+      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_v_chrom_id);
+      __pyx_v_chrom_id = __pyx_t_2;
+      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_v_chrom_size);
+      __pyx_v_chrom_size = __pyx_t_3;
+      __pyx_t_3 = 0;
+    } else {
+      __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_v_chrom_id);
+      __pyx_v_chrom_id = __pyx_t_2;
+      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_v_chrom_size);
+      __pyx_v_chrom_size = __pyx_t_3;
+      __pyx_t_3 = 0;
+    }
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":113
+ *             # The value is two 32 bit uints, use the BPT's reader for checking byteswapping
+ *             chrom_id, chrom_size = self.chrom_bpt.reader.unpack( "II", bytes )
+ *             return chrom_id, chrom_size             # <<<<<<<<<<<<<<
+ *         else:
+ *             return None
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_chrom_id);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom_id);
+    __Pyx_GIVEREF(__pyx_v_chrom_id);
+    __Pyx_INCREF(__pyx_v_chrom_size);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_chrom_size);
+    __Pyx_GIVEREF(__pyx_v_chrom_size);
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+    goto __pyx_L5;
+  }
+  /*else*/ {
+
+    /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":115
+ *             return chrom_id, chrom_size
+ *         else:
+ *             return None             # <<<<<<<<<<<<<<
+ * 
+ * cdef class ZoomLevel:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+  __pyx_L5:;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("bx.bbi.bbi_file.BBIFile._get_chrom_id_and_size");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_DECREF(__pyx_v_bytes);
+  __Pyx_DECREF(__pyx_v_chrom_id);
+  __Pyx_DECREF(__pyx_v_chrom_size);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":119
+ * cdef class ZoomLevel:
+ *     cdef BBIFile bbi_file
+ *     cdef public bits32 reduction_level             # <<<<<<<<<<<<<<
+ *     cdef bits32 reserved
+ *     cdef public bits64 data_offset
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_15reduction_level___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_15reduction_level___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->reduction_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __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("bx.bbi.bbi_file.ZoomLevel.reduction_level.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_15reduction_level___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_15reduction_level___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_t_1;
+  __Pyx_RefNannySetupContext("__set__");
+  __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->reduction_level = __pyx_t_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.ZoomLevel.reduction_level.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":121
+ *     cdef public bits32 reduction_level
+ *     cdef bits32 reserved
+ *     cdef public bits64 data_offset             # <<<<<<<<<<<<<<
+ *     cdef public bits64 index_offset
+ * 
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_11data_offset___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_11data_offset___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyLong_FromUnsignedLongLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->data_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_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("bx.bbi.bbi_file.ZoomLevel.data_offset.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_11data_offset___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_11data_offset___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __pyx_t_2bx_3bbi_5types_bits64 __pyx_t_1;
+  __Pyx_RefNannySetupContext("__set__");
+  __pyx_t_1 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->data_offset = __pyx_t_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.ZoomLevel.data_offset.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":122
+ *     cdef bits32 reserved
+ *     cdef public bits64 data_offset
+ *     cdef public bits64 index_offset             # <<<<<<<<<<<<<<
+ * 
+ *     def summaries_in_region( self, bits32 chrom_id, bits32 start, bits32 end ):
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_12index_offset___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_12index_offset___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  __Pyx_RefNannySetupContext("__get__");
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyLong_FromUnsignedLongLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->index_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_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("bx.bbi.bbi_file.ZoomLevel.index_offset.__get__");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_12index_offset___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_12index_offset___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __pyx_t_2bx_3bbi_5types_bits64 __pyx_t_1;
+  __Pyx_RefNannySetupContext("__set__");
+  __pyx_t_1 = __Pyx_PyInt_AsUnsignedLongLong(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->index_offset = __pyx_t_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.ZoomLevel.index_offset.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":124
+ *     cdef public bits64 index_offset
+ * 
+ *     def summaries_in_region( self, bits32 chrom_id, bits32 start, bits32 end ):             # <<<<<<<<<<<<<<
+ *         cdef CIRTreeFile ctf
+ *         cdef int item_count
+ */
+
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_summaries_in_region(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pf_2bx_3bbi_8bbi_file_9ZoomLevel_summaries_in_region(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_v_chrom_id;
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_v_start;
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_v_end;
+  struct __pyx_obj_2bx_3bbi_12cirtree_file_CIRTreeFile *__pyx_v_ctf;
+  int __pyx_v_item_count;
+  PyObject *__pyx_v_rval;
+  PyObject *__pyx_v_reader;
+  PyObject *__pyx_v_block_list;
+  PyObject *__pyx_v_offset;
+  PyObject *__pyx_v_size;
+  PyObject *__pyx_v_block_data;
+  PyObject *__pyx_v_block_size;
+  PyObject *__pyx_v_block_reader;
+  long __pyx_v_i;
+  struct __pyx_obj_2bx_3bbi_8bbi_file_Summary *__pyx_v_summary;
+  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  int __pyx_t_7;
+  Py_ssize_t __pyx_t_8;
+  int __pyx_t_9;
+  __pyx_t_2bx_3bbi_5types_bits32 __pyx_t_10;
+  float __pyx_t_11;
+  int __pyx_t_12;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__chrom_id,&__pyx_n_s__start,&__pyx_n_s__end,0};
+  __Pyx_RefNannySetupContext("summaries_in_region");
+  if (unlikely(__pyx_kwds)) {
+    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+    PyObject* values[3] = {0,0,0};
+    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);
+      case  0: break;
+      default: goto __pyx_L5_argtuple_error;
+    }
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  0:
+      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chrom_id);
+      if (likely(values[0])) kw_args--;
+      else goto __pyx_L5_argtuple_error;
+      case  1:
+      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+      if (likely(values[1])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("summaries_in_region", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+      case  2:
+      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
+      if (likely(values[2])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("summaries_in_region", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    }
+    if (unlikely(kw_args > 0)) {
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "summaries_in_region") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    }
+    __pyx_v_chrom_id = __Pyx_PyInt_AsUnsignedInt(values[0]); if (unlikely((__pyx_v_chrom_id == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_start = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_start == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_end = __Pyx_PyInt_AsUnsignedInt(values[2]); if (unlikely((__pyx_v_end == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+    goto __pyx_L5_argtuple_error;
+  } else {
+    __pyx_v_chrom_id = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_chrom_id == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_start = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_start == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_end = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_end == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("summaries_in_region", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("bx.bbi.bbi_file.ZoomLevel.summaries_in_region");
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_v_ctf = ((struct __pyx_obj_2bx_3bbi_12cirtree_file_CIRTreeFile *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_rval = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
+  __pyx_v_reader = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_block_list = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_offset = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_size = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_block_data = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_block_size = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_block_reader = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_v_summary = ((struct __pyx_obj_2bx_3bbi_8bbi_file_Summary *)Py_None); __Pyx_INCREF(Py_None);
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":127
+ *         cdef CIRTreeFile ctf
+ *         cdef int item_count
+ *         rval = []             # <<<<<<<<<<<<<<
+ *         reader = self.bbi_file.reader
+ *         reader.seek( self.index_offset )
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_DECREF(((PyObject *)__pyx_v_rval));
+  __pyx_v_rval = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":128
+ *         cdef int item_count
+ *         rval = []
+ *         reader = self.bbi_file.reader             # <<<<<<<<<<<<<<
+ *         reader.seek( self.index_offset )
+ *         ctf = CIRTreeFile( reader.file )
+ */
+  __Pyx_INCREF(((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->bbi_file->reader);
+  __Pyx_DECREF(__pyx_v_reader);
+  __pyx_v_reader = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->bbi_file->reader;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":129
+ *         rval = []
+ *         reader = self.bbi_file.reader
+ *         reader.seek( self.index_offset )             # <<<<<<<<<<<<<<
+ *         ctf = CIRTreeFile( reader.file )
+ *         block_list = ctf.find_overlapping_blocks( chrom_id, start, end )
+ */
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__seek); 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_t_2 = PyLong_FromUnsignedLongLong(((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->index_offset); 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_3 = PyTuple_New(1); 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);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __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;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":130
+ *         reader = self.bbi_file.reader
+ *         reader.seek( self.index_offset )
+ *         ctf = CIRTreeFile( reader.file )             # <<<<<<<<<<<<<<
+ *         block_list = ctf.find_overlapping_blocks( chrom_id, start, end )
+ *         for offset, size in block_list:
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__file); 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_3 = PyTuple_New(1); 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);
+  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*)__pyx_ptype_2bx_3bbi_12cirtree_file_CIRTreeFile)), __pyx_t_3, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_v_ctf));
+  __pyx_v_ctf = ((struct __pyx_obj_2bx_3bbi_12cirtree_file_CIRTreeFile *)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":131
+ *         reader.seek( self.index_offset )
+ *         ctf = CIRTreeFile( reader.file )
+ *         block_list = ctf.find_overlapping_blocks( chrom_id, start, end )             # <<<<<<<<<<<<<<
+ *         for offset, size in block_list:
+ *             # Seek to and read all data for the block
+ */
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_ctf), __pyx_n_s_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyLong_FromUnsignedLong(__pyx_v_chrom_id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __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 = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_3 = 0;
+  __pyx_t_1 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_v_block_list);
+  __pyx_v_block_list = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "/home/james/projects/bx-python/code/bx-python/lib/bx/bbi/bbi_file.pyx":132
+ *         ctf = CIRTreeFile( reader.file )
+ *         block_list = ctf.find_overlapping_blocks( chrom_id, start, end )
+ *         for offset, size in block_list:             # <<<<<<<<<<<<<<