Commits

Kanwei Li  committed d051ad5

Add BigWig tests and test datasets. Fix error with min and max values being switched. Fix issue with fetching from full.

  • Participants
  • Parent commits dd96762

Comments (0)

Files changed (8)

File lib/bx/bbi/bbi_file.c

-/* Generated by Cython 0.13 on Wed Dec  1 12:31:34 2010 */
+/* Generated by Cython 0.13 on Wed Dec  8 18:23:28 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
 
 typedef npy_cdouble __pyx_t_5numpy_complex_t;
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":35
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":35
  * cdef inline int imin(int a, int b): return a if a <= b else b
  * 
  * cdef enum summary_type:             # <<<<<<<<<<<<<<
   __pyx_e_2bx_3bbi_8bbi_file_summary_type_sd = 4
 };
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pxd":8
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pxd":8
  * cimport numpy
  * 
  * cdef class SummaryBlock:             # <<<<<<<<<<<<<<
   double sum_squares;
 };
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/cirtree_file.pxd":3
+/* "/Users/kanwei/bx-python/lib/bx/bbi/cirtree_file.pxd":3
  * from types cimport *
  * 
  * cdef class CIRTreeFile:             # <<<<<<<<<<<<<<
   __pyx_t_2bx_3bbi_5types_bits32 items_per_slot;
 };
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pxd":21
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pxd":21
  *     cdef public double sum_squares
  * 
  * cdef class SummarizedData:             # <<<<<<<<<<<<<<
   PyArrayObject *sum_squares;
 };
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":189
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":195
  *         return closest_level
  * 
  * cdef class ZoomLevel:             # <<<<<<<<<<<<<<
   int item_count;
 };
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pxd":33
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pxd":33
  *     cdef public numpy.ndarray sum_squares
  * 
  * cdef class BBIFile:             # <<<<<<<<<<<<<<
   PyObject *level_list;
 };
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bpt_file.pxd":5
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bpt_file.pxd":5
  * from types cimport *
  * 
  * cdef class BPTFile:             # <<<<<<<<<<<<<<
 };
 
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":61
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":61
  *         self.sum_squares = numpy.zeros( self.size, dtype=numpy.float64 )
  * 
  * cdef class BBIFile:             # <<<<<<<<<<<<<<
   PyObject *(*_best_zoom_level)(struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *, int);
   PyObject *(*summarize)(struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *, char *, __pyx_t_2bx_3bbi_5types_bits32, __pyx_t_2bx_3bbi_5types_bits32, int, int __pyx_skip_dispatch);
   PyObject *(*query)(struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *, char *, __pyx_t_2bx_3bbi_5types_bits32, __pyx_t_2bx_3bbi_5types_bits32, int, int __pyx_skip_dispatch);
+  PyObject *(*_summarize_from_full)(struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *, __pyx_t_2bx_3bbi_5types_bits32, __pyx_t_2bx_3bbi_5types_bits32, __pyx_t_2bx_3bbi_5types_bits32, int);
 };
 static struct __pyx_vtabstruct_2bx_3bbi_8bbi_file_BBIFile *__pyx_vtabptr_2bx_3bbi_8bbi_file_BBIFile;
 
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":189
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":195
  *         return closest_level
  * 
  * cdef class ZoomLevel:             # <<<<<<<<<<<<<<
 static char __pyx_k_16[] = "BBIFile.open (line 72)";
 static char __pyx_k_17[] = "BBIFile.summarize (line 110)";
 static char __pyx_k_18[] = "BBIFile.query (line 134)";
-static char __pyx_k_19[] = "ZoomLevel._summary_blocks_in_region (line 197)";
+static char __pyx_k_19[] = "ZoomLevel._summary_blocks_in_region (line 203)";
 static char __pyx_k__B[] = "B";
 static char __pyx_k__H[] = "H";
 static char __pyx_k__I[] = "I";
 static PyObject *__pyx_int_32;
 static PyObject *__pyx_int_64;
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":29
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":29
  * DEF summary_on_disk_size = 32
  * 
  * cdef inline int range_intersection( int start1, int end1, int start2, int end2 ):             # <<<<<<<<<<<<<<
   int __pyx_t_4;
   __Pyx_RefNannySetupContext("range_intersection");
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":30
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":30
  * 
  * cdef inline int range_intersection( int start1, int end1, int start2, int end2 ):
  *     return min( end1, end2 ) - max( start1, start2 )             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":32
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":32
  *     return min( end1, end2 ) - max( start1, start2 )
  * 
  * cdef inline int imax(int a, int b): return a if a >= b else b             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":33
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":33
  * 
  * cdef inline int imax(int a, int b): return a if a >= b else b
  * cdef inline int imin(int a, int b): return a if a <= b else b             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":53
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":53
  *     aggregation over a particular range and resolution
  *     """
  *     def __init__( self, int size ):             # <<<<<<<<<<<<<<
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":54
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":54
  *     """
  *     def __init__( self, int size ):
  *         self.size = size             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummarizedData *)__pyx_v_self)->size = __pyx_v_size;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":55
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":55
  *     def __init__( self, int size ):
  *         self.size = size
  *         self.valid_count = numpy.zeros( self.size, dtype=numpy.uint64 )             # <<<<<<<<<<<<<<
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummarizedData *)__pyx_v_self)->valid_count = ((PyArrayObject *)__pyx_t_5);
   __pyx_t_5 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":56
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":56
  *         self.size = size
  *         self.valid_count = numpy.zeros( self.size, dtype=numpy.uint64 )
  *         self.min_val = numpy.zeros( self.size, dtype=numpy.float64 )             # <<<<<<<<<<<<<<
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummarizedData *)__pyx_v_self)->min_val = ((PyArrayObject *)__pyx_t_4);
   __pyx_t_4 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":57
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":57
  *         self.valid_count = numpy.zeros( self.size, dtype=numpy.uint64 )
  *         self.min_val = numpy.zeros( self.size, dtype=numpy.float64 )
  *         self.max_val = numpy.zeros( self.size, dtype=numpy.float64 )             # <<<<<<<<<<<<<<
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummarizedData *)__pyx_v_self)->max_val = ((PyArrayObject *)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":58
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":58
  *         self.min_val = numpy.zeros( self.size, dtype=numpy.float64 )
  *         self.max_val = numpy.zeros( self.size, dtype=numpy.float64 )
  *         self.sum_data = numpy.zeros( self.size, dtype=numpy.float64 )             # <<<<<<<<<<<<<<
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummarizedData *)__pyx_v_self)->sum_data = ((PyArrayObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":59
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":59
  *         self.max_val = numpy.zeros( self.size, dtype=numpy.float64 )
  *         self.sum_data = numpy.zeros( self.size, dtype=numpy.float64 )
  *         self.sum_squares = numpy.zeros( self.size, dtype=numpy.float64 )             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":68
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":68
  *     """
  * 
  *     def __init__( self, file=None, expected_sig=None, type_name=None ):             # <<<<<<<<<<<<<<
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":69
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":69
  * 
  *     def __init__( self, file=None, expected_sig=None, type_name=None ):
  *         if file is not None:             # <<<<<<<<<<<<<<
   __pyx_t_1 = (__pyx_v_file != Py_None);
   if (__pyx_t_1) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":70
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":70
  *     def __init__( self, file=None, expected_sig=None, type_name=None ):
  *         if file is not None:
  *             self.open( file, expected_sig, type_name )             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":72
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":72
  *             self.open( file, expected_sig, type_name )
  * 
  *     def open( self, file, expected_sig, type_name ):             # <<<<<<<<<<<<<<
   __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);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":77
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":77
  *         in since this is generic.
  *         """
  *         assert expected_sig is not None             # <<<<<<<<<<<<<<
   }
   #endif
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":78
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":78
  *         """
  *         assert expected_sig is not None
  *         self.file = 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;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":80
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":80
  *         self.file = file
  *         # Open the file in a BinaryFileReader, handles magic and byteswapping
  *         self.reader = reader = BinaryFileReader( file, expected_sig )             # <<<<<<<<<<<<<<
   __pyx_v_reader = __pyx_t_4;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":81
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":81
  *         # Open the file in a BinaryFileReader, handles magic and byteswapping
  *         self.reader = reader = BinaryFileReader( file, expected_sig )
  *         self.magic = expected_sig             # <<<<<<<<<<<<<<
   __pyx_t_5 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_expected_sig); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->magic = __pyx_t_5;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":82
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":82
  *         self.reader = reader = BinaryFileReader( file, expected_sig )
  *         self.magic = expected_sig
  *         self.is_byteswapped = self.reader.byteswap_needed             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->is_byteswapped = __pyx_t_6;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":84
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":84
  *         self.is_byteswapped = self.reader.byteswap_needed
  *         # Read header stuff
  *         self.version = reader.read_uint16()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->version = __pyx_t_7;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":85
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":85
  *         # Read header stuff
  *         self.version = reader.read_uint16()
  *         self.zoom_levels = reader.read_uint16()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->zoom_levels = __pyx_t_7;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":86
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":86
  *         self.version = reader.read_uint16()
  *         self.zoom_levels = reader.read_uint16()
  *         self.chrom_tree_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->chrom_tree_offset = __pyx_t_8;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":87
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":87
  *         self.zoom_levels = reader.read_uint16()
  *         self.chrom_tree_offset = reader.read_uint64()
  *         self.unzoomed_data_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->unzoomed_data_offset = __pyx_t_8;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":88
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":88
  *         self.chrom_tree_offset = reader.read_uint64()
  *         self.unzoomed_data_offset = reader.read_uint64()
  *         self.unzoomed_index_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->unzoomed_index_offset = __pyx_t_8;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":89
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":89
  *         self.unzoomed_data_offset = reader.read_uint64()
  *         self.unzoomed_index_offset = reader.read_uint64()
  *         self.field_count = reader.read_uint16()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->field_count = __pyx_t_7;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":90
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":90
  *         self.unzoomed_index_offset = reader.read_uint64()
  *         self.field_count = reader.read_uint16()
  *         self.defined_field_count = reader.read_uint16()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->defined_field_count = __pyx_t_7;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":91
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":91
  *         self.field_count = reader.read_uint16()
  *         self.defined_field_count = reader.read_uint16()
  *         self.as_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->as_offset = __pyx_t_8;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":92
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":92
  *         self.defined_field_count = reader.read_uint16()
  *         self.as_offset = reader.read_uint64()
  *         self.total_summary_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->total_summary_offset = __pyx_t_8;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":93
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":93
  *         self.as_offset = reader.read_uint64()
  *         self.total_summary_offset = reader.read_uint64()
  *         self.uncompress_buf_size = reader.read_uint32()             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->uncompress_buf_size = __pyx_t_5;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":95
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":95
  *         self.uncompress_buf_size = reader.read_uint32()
  *         # Skip reserved
  *         reader.seek( 64 )             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":97
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":97
  *         reader.seek( 64 )
  *         # Read zoom headers
  *         self.level_list = []             # <<<<<<<<<<<<<<
   ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->level_list = ((PyObject *)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":98
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":98
  *         # Read zoom headers
  *         self.level_list = []
  *         for i from 0 <= i < self.zoom_levels:             # <<<<<<<<<<<<<<
   __pyx_t_7 = ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self)->zoom_levels;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":99
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":99
  *         self.level_list = []
  *         for i from 0 <= i < self.zoom_levels:
  *             level = ZoomLevel()             # <<<<<<<<<<<<<<
     __pyx_v_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_t_2);
     __pyx_t_2 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":100
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":100
  *         for i from 0 <= i < self.zoom_levels:
  *             level = ZoomLevel()
  *             level.bbi_file = self             # <<<<<<<<<<<<<<
     __Pyx_DECREF(((PyObject *)__pyx_v_level->bbi_file));
     __pyx_v_level->bbi_file = ((struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self);
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":101
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":101
  *             level = ZoomLevel()
  *             level.bbi_file = self
  *             level.reduction_level = reader.read_uint32()             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __pyx_v_level->reduction_level = __pyx_t_5;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":102
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":102
  *             level.bbi_file = self
  *             level.reduction_level = reader.read_uint32()
  *             level.reserved = reader.read_uint32()             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_v_level->reserved = __pyx_t_5;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":103
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":103
  *             level.reduction_level = reader.read_uint32()
  *             level.reserved = reader.read_uint32()
  *             level.data_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __pyx_v_level->data_offset = __pyx_t_8;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":104
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":104
  *             level.reserved = reader.read_uint32()
  *             level.data_offset = reader.read_uint64()
  *             level.index_offset = reader.read_uint64()             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_v_level->index_offset = __pyx_t_8;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":105
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":105
  *             level.data_offset = reader.read_uint64()
  *             level.index_offset = reader.read_uint64()
  *             self.level_list.append( level )             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   }
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":107
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":107
  *             self.level_list.append( level )
  *         # Initialize and attach embedded BPTFile containing chromosome names and ids
  *         reader.seek( self.chrom_tree_offset )             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":108
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":108
  *         # Initialize and attach embedded BPTFile containing chromosome names and ids
  *         reader.seek( self.chrom_tree_offset )
  *         self.chrom_bpt = BPTFile( file=self.file )             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":110
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":110
  *         self.chrom_bpt = BPTFile( file=self.file )
  * 
  *     cpdef summarize( self, char * chrom, bits32 start, bits32 end, int summary_size ):             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":114
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":114
  *         Gets `summary_size` data points over the regions `chrom`:`start`-`end`.
  *         """
  *         if start >= end:             # <<<<<<<<<<<<<<
   __pyx_t_7 = (__pyx_v_start >= __pyx_v_end);
   if (__pyx_t_7) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":115
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":115
  *         """
  *         if start >= end:
  *             return None             # <<<<<<<<<<<<<<
   }
   __pyx_L3:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":116
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":116
  *         if start >= end:
  *             return None
  *         chrom_id, chrom_size = self._get_chrom_id_and_size( chrom )             # <<<<<<<<<<<<<<
     __pyx_t_6 = 0;
   }
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":117
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":117
  *             return None
  *         chrom_id, chrom_size = self._get_chrom_id_and_size( chrom )
  *         if chrom_id is None:             # <<<<<<<<<<<<<<
   __pyx_t_7 = (__pyx_v_chrom_id == Py_None);
   if (__pyx_t_7) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":118
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":118
  *         chrom_id, chrom_size = self._get_chrom_id_and_size( chrom )
  *         if chrom_id is None:
  *             return None             # <<<<<<<<<<<<<<
   }
   __pyx_L4:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":123
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":123
  * 
  *         # Find appropriate zoom level
  *         cdef bits32 base_size = end - start             # <<<<<<<<<<<<<<
  */
   __pyx_v_base_size = (__pyx_v_end - __pyx_v_start);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":124
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":124
  *         # Find appropriate zoom level
  *         cdef bits32 base_size = end - start
  *         cdef int full_reduction = base_size / summary_size             # <<<<<<<<<<<<<<
   }
   __pyx_v_full_reduction = (__pyx_v_base_size / __pyx_v_summary_size);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":125
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":125
  *         cdef bits32 base_size = end - start
  *         cdef int full_reduction = base_size / summary_size
  *         cdef int zoom = full_reduction / 2             # <<<<<<<<<<<<<<
  */
   __pyx_v_zoom = __Pyx_div_long(__pyx_v_full_reduction, 2);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":126
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":126
  *         cdef int full_reduction = base_size / summary_size
  *         cdef int zoom = full_reduction / 2
  *         if zoom < 0:             # <<<<<<<<<<<<<<
   __pyx_t_7 = (__pyx_v_zoom < 0);
   if (__pyx_t_7) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":127
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":127
  *         cdef int zoom = full_reduction / 2
  *         if zoom < 0:
  *             zoom = 0             # <<<<<<<<<<<<<<
   }
   __pyx_L5:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":128
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":128
  *         if zoom < 0:
  *             zoom = 0
  *         cdef ZoomLevel zoom_level = self._best_zoom_level( zoom )             # <<<<<<<<<<<<<<
   __pyx_v_zoom_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":129
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":129
  *             zoom = 0
  *         cdef ZoomLevel zoom_level = self._best_zoom_level( zoom )
  *         if zoom_level is not None:             # <<<<<<<<<<<<<<
   __pyx_t_7 = (((PyObject *)__pyx_v_zoom_level) != Py_None);
   if (__pyx_t_7) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":130
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":130
  *         cdef ZoomLevel zoom_level = self._best_zoom_level( zoom )
  *         if zoom_level is not None:
  *             return zoom_level._summarize( chrom_id, start, end, summary_size )             # <<<<<<<<<<<<<<
   }
   /*else*/ {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":132
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":132
  *             return zoom_level._summarize( chrom_id, start, end, summary_size )
  *         else:
  *             return self._summarize_from_full( chrom_id, start, end, summary_size )             # <<<<<<<<<<<<<<
  *     cpdef query( self, char * chrom, bits32 start, bits32 end, int summary_size ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_chrom_id); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = ((struct __pyx_vtabstruct_2bx_3bbi_8bbi_file_BBIFile *)__pyx_v_self->__pyx_vtab)->_summarize_from_full(__pyx_v_self, __pyx_t_8, __pyx_v_start, __pyx_v_end, __pyx_v_summary_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_6 = PyLong_FromUnsignedLong(__pyx_v_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_5 = PyLong_FromUnsignedLong(__pyx_v_end); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_4 = PyInt_FromLong(__pyx_v_summary_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_INCREF(__pyx_v_chrom_id);
-    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chrom_id);
-    __Pyx_GIVEREF(__pyx_v_chrom_id);
-    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
-    __Pyx_GIVEREF(__pyx_t_6);
-    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
-    __Pyx_GIVEREF(__pyx_t_5);
-    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
-    __Pyx_GIVEREF(__pyx_t_4);
-    __pyx_t_6 = 0;
-    __pyx_t_5 = 0;
-    __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_r = __pyx_t_4;
-    __pyx_t_4 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
     goto __pyx_L0;
   }
   __pyx_L6:;
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":110
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":110
  *         self.chrom_bpt = BPTFile( file=self.file )
  * 
  *     cpdef summarize( self, char * chrom, bits32 start, bits32 end, int summary_size ):             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":134
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":134
  *             return self._summarize_from_full( chrom_id, start, end, summary_size )
  * 
  *     cpdef query( self, char * chrom, bits32 start, bits32 end, int summary_size ):             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":138
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":138
  *         Return dictionary with keys: mean, max, min, coverage, std_dev
  *         """
  *         if end > 2147483647 or start < 0:             # <<<<<<<<<<<<<<
   }
   if (__pyx_t_9) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":139
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":139
  *         """
  *         if end > 2147483647 or start < 0:
  *             raise ValueError             # <<<<<<<<<<<<<<
   }
   __pyx_L3:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":140
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":140
  *         if end > 2147483647 or start < 0:
  *             raise ValueError
  *         results = self.summarize(chrom, start, end, summary_size)             # <<<<<<<<<<<<<<
   __pyx_v_results = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":141
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":141
  *             raise ValueError
  *         results = self.summarize(chrom, start, end, summary_size)
  *         if not results:             # <<<<<<<<<<<<<<
   __pyx_t_7 = (!__pyx_t_9);
   if (__pyx_t_7) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":142
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":142
  *         results = self.summarize(chrom, start, end, summary_size)
  *         if not results:
  *             return None             # <<<<<<<<<<<<<<
   }
   __pyx_L4:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":144
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":144
  *             return None
  * 
  *         rval = []             # <<<<<<<<<<<<<<
   __pyx_v_rval = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":145
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":145
  * 
  *         rval = []
  *         for i in range(summary_size):             # <<<<<<<<<<<<<<
   for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
     __pyx_v_i = __pyx_t_11;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":146
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":146
  *         rval = []
  *         for i in range(summary_size):
  *             sum_data = results.sum_data[i]             # <<<<<<<<<<<<<<
     __pyx_v_sum_data = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":147
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":147
  *         for i in range(summary_size):
  *             sum_data = results.sum_data[i]
  *             valid_count = results.valid_count[i]             # <<<<<<<<<<<<<<
     __pyx_v_valid_count = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":148
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":148
  *             sum_data = results.sum_data[i]
  *             valid_count = results.valid_count[i]
  *             mean = sum_data / valid_count             # <<<<<<<<<<<<<<
     __pyx_v_mean = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":149
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":149
  *             valid_count = results.valid_count[i]
  *             mean = sum_data / valid_count
  *             coverage = <double> summary_size / (end - start) * valid_count             # <<<<<<<<<<<<<<
     __pyx_v_coverage = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":152
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":152
  * 
  *             # print results.sum_squares[i], sum_data, valid_count
  *             variance = results.sum_squares[i] - sum_data * sum_data / valid_count             # <<<<<<<<<<<<<<
     __pyx_v_variance = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":153
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":153
  *             # print results.sum_squares[i], sum_data, valid_count
  *             variance = results.sum_squares[i] - sum_data * sum_data / valid_count
  *             if valid_count > 1:             # <<<<<<<<<<<<<<
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_7) {
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":154
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":154
  *             variance = results.sum_squares[i] - sum_data * sum_data / valid_count
  *             if valid_count > 1:
  *                 variance /= valid_count - 1             # <<<<<<<<<<<<<<
     }
     __pyx_L7:;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":155
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":155
  *             if valid_count > 1:
  *                 variance /= valid_count - 1
  *             std_dev = math.sqrt(max(variance, 0))             # <<<<<<<<<<<<<<
     __pyx_v_std_dev = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":157
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":157
  *             std_dev = math.sqrt(max(variance, 0))
  * 
  *             rval.append( { "mean": mean, "max": results.max_val[i], "min": results.min_val[i], \             # <<<<<<<<<<<<<<
     if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__min), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":158
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":158
  * 
  *             rval.append( { "mean": mean, "max": results.max_val[i], "min": results.min_val[i], \
  *                         "coverage": coverage, "std_dev": std_dev } )             # <<<<<<<<<<<<<<
     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   }
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":160
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":160
  *                         "coverage": coverage, "std_dev": std_dev } )
  * 
  *         return rval             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":134
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":134
  *             return self._summarize_from_full( chrom_id, start, end, summary_size )
  * 
  *     cpdef query( self, char * chrom, bits32 start, bits32 end, int summary_size ):             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":162
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":162
  *         return rval
  * 
  *     cdef _get_chrom_id_and_size( self, char * chrom ):             # <<<<<<<<<<<<<<
   __pyx_v_chrom_id = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_chrom_size = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":166
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":166
  *         Lookup id and size from the chromosome named `chrom`
  *         """
  *         bytes = self.chrom_bpt.find( chrom )             # <<<<<<<<<<<<<<
   __pyx_v_bytes = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":167
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":167
  *         """
  *         bytes = self.chrom_bpt.find( chrom )
  *         if bytes is not None:             # <<<<<<<<<<<<<<
   __pyx_t_4 = (__pyx_v_bytes != Py_None);
   if (__pyx_t_4) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":169
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":169
  *         if bytes is not None:
  *             # The value is two 32 bit uints, use the BPT's reader for checking byteswapping
  *             assert len( bytes ) == 8             # <<<<<<<<<<<<<<
     }
     #endif
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":170
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":170
  *             # The value is two 32 bit uints, use the BPT's reader for checking byteswapping
  *             assert len( bytes ) == 8
  *             chrom_id, chrom_size = self.chrom_bpt.reader.unpack( "II", bytes )             # <<<<<<<<<<<<<<
       __pyx_t_2 = 0;
     }
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":171
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":171
  *             assert len( bytes ) == 8
  *             chrom_id, chrom_size = self.chrom_bpt.reader.unpack( "II", bytes )
  *             return chrom_id, chrom_size             # <<<<<<<<<<<<<<
   }
   /*else*/ {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":173
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":173
  *             return chrom_id, chrom_size
  *         else:
  *             return None, None             # <<<<<<<<<<<<<<
  * 
- *     cdef _best_zoom_level( self, int desired_reduction ):
+ *     cdef _summarize_from_full( self, bits32 chrom_id, bits32 start, bits32 end, int summary_size ):
  */
     __Pyx_XDECREF(__pyx_r);
     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":175
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":175
  *             return None, None
  * 
+ *     cdef _summarize_from_full( self, bits32 chrom_id, bits32 start, bits32 end, int summary_size ):             # <<<<<<<<<<<<<<
+ *         """
+ *         Create summary from full data. This is data specific so must be overridden.
+ */
+
+static  PyObject *__pyx_f_2bx_3bbi_8bbi_file_7BBIFile__summarize_from_full(struct __pyx_obj_2bx_3bbi_8bbi_file_BBIFile *__pyx_v_self, __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, int __pyx_v_summary_size) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannySetupContext("_summarize_from_full");
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":181
+ *         pass
+ * 
  *     cdef _best_zoom_level( self, int desired_reduction ):             # <<<<<<<<<<<<<<
  *         if desired_reduction <= 1:
  *             return None
   __pyx_v_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)Py_None); __Pyx_INCREF(Py_None);
   __pyx_v_closest_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)Py_None); __Pyx_INCREF(Py_None);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":176
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":182
  * 
  *     cdef _best_zoom_level( self, int desired_reduction ):
  *         if desired_reduction <= 1:             # <<<<<<<<<<<<<<
   __pyx_t_1 = (__pyx_v_desired_reduction <= 1);
   if (__pyx_t_1) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":177
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":183
  *     cdef _best_zoom_level( self, int desired_reduction ):
  *         if desired_reduction <= 1:
  *             return None             # <<<<<<<<<<<<<<
   }
   __pyx_L3:;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":180
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":186
  * 
  *         cdef ZoomLevel level, closest_level
  *         cdef int diff, closest_diff = limits.INT_MAX             # <<<<<<<<<<<<<<
  */
   __pyx_v_closest_diff = INT_MAX;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":182
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":188
  *         cdef int diff, closest_diff = limits.INT_MAX
  * 
  *         for level in self.level_list:             # <<<<<<<<<<<<<<
   if (PyList_CheckExact(__pyx_v_self->level_list) || PyTuple_CheckExact(__pyx_v_self->level_list)) {
     __pyx_t_2 = 0; __pyx_t_3 = __pyx_v_self->level_list; __Pyx_INCREF(__pyx_t_3);
   } else {
-    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->level_list); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->level_list); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
   }
   for (;;) {
     } else {
       __pyx_t_4 = PyIter_Next(__pyx_t_3);
       if (!__pyx_t_4) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
       __Pyx_GOTREF(__pyx_t_4);
     }
-    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_2bx_3bbi_8bbi_file_ZoomLevel))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_2bx_3bbi_8bbi_file_ZoomLevel))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(((PyObject *)__pyx_v_level));
     __pyx_v_level = ((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_t_4);
     __pyx_t_4 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":183
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":189
  * 
  *         for level in self.level_list:
  *             diff = desired_reduction - level.reduction_level             # <<<<<<<<<<<<<<
  */
     __pyx_v_diff = (__pyx_v_desired_reduction - __pyx_v_level->reduction_level);
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":184
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":190
  *         for level in self.level_list:
  *             diff = desired_reduction - level.reduction_level
  *             if diff >= 0 and diff < closest_diff:             # <<<<<<<<<<<<<<
     }
     if (__pyx_t_6) {
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":185
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":191
  *             diff = desired_reduction - level.reduction_level
  *             if diff >= 0 and diff < closest_diff:
  *                 closest_diff = diff             # <<<<<<<<<<<<<<
  */
       __pyx_v_closest_diff = __pyx_v_diff;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":186
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":192
  *             if diff >= 0 and diff < closest_diff:
  *                 closest_diff = diff
  *                 closest_level = level             # <<<<<<<<<<<<<<
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":187
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":193
  *                 closest_diff = diff
  *                 closest_level = level
  *         return closest_level             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":191
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":197
  * cdef class ZoomLevel:
  *     cdef BBIFile bbi_file
  *     cdef public bits32 reduction_level             # <<<<<<<<<<<<<<
   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 = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   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 = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 197; __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;
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":193
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":199
  *     cdef public bits32 reduction_level
  *     cdef bits32 reserved
  *     cdef public bits64 data_offset             # <<<<<<<<<<<<<<
   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 = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   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 = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 199; __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;
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":194
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":200
  *     cdef bits32 reserved
  *     cdef public bits64 data_offset
  *     cdef public bits64 index_offset             # <<<<<<<<<<<<<<
   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 = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   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 = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 200; __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;
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":197
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":203
  *     cdef int item_count
  * 
  *     def _summary_blocks_in_region( self, bits32 chrom_id, bits32 start, bits32 end ):             # <<<<<<<<<<<<<<
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("_summary_blocks_in_region", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("_summary_blocks_in_region", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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("_summary_blocks_in_region", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("_summary_blocks_in_region", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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), "_summary_blocks_in_region") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __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 = 197; __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 = 197; __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 = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_summary_blocks_in_region") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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 = 203; __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 = 203; __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 = 203; __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 = 197; __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 = 197; __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 = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __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 = 203; __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 = 203; __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 = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_summary_blocks_in_region", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_summary_blocks_in_region", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("bx.bbi.bbi_file.ZoomLevel._summary_blocks_in_region");
   __Pyx_RefNannyFinishContext();
   __pyx_v_block_reader = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_summary = ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummaryBlock *)Py_None); __Pyx_INCREF(Py_None);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":203
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":209
  *         """
  *         cdef CIRTreeFile ctf
  *         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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __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;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":204
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":210
  *         cdef CIRTreeFile ctf
  *         rval = []
  *         reader = 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;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":205
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":211
  *         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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = 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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 211; __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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_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;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":206
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":212
  *         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 = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __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 = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 212; __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;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":207
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":213
  *         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_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_ctf), __pyx_n_s_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyLong_FromUnsignedLong(__pyx_v_chrom_id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyLong_FromUnsignedLong(__pyx_v_chrom_id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   __pyx_t_3 = 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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __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_v_block_list = __pyx_t_4;
   __pyx_t_4 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":208
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":214
  *         ctf = CIRTreeFile( reader.file )
  *         block_list = ctf.find_overlapping_blocks( chrom_id, start, end )
  *         for offset, size in block_list:             # <<<<<<<<<<<<<<
   if (PyList_CheckExact(__pyx_v_block_list) || PyTuple_CheckExact(__pyx_v_block_list)) {
     __pyx_t_6 = 0; __pyx_t_4 = __pyx_v_block_list; __Pyx_INCREF(__pyx_t_4);
   } else {
-    __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_block_list); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_block_list); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
   }
   for (;;) {
     } else {
       __pyx_t_5 = PyIter_Next(__pyx_t_4);
       if (!__pyx_t_5) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
       __Pyx_GOTREF(__pyx_t_5);
       __pyx_v_size = __pyx_t_1;
       __pyx_t_1 = 0;
     } else {
-      __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_3, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_3, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_3, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_3, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      if (__Pyx_EndUnpack(__pyx_t_3, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_EndUnpack(__pyx_t_3, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_v_offset);
       __pyx_v_offset = __pyx_t_2;
       __pyx_t_1 = 0;
     }
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":210
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":216
  *         for offset, size in block_list:
  *             # Seek to and read all data for the block
  *             reader.seek( offset )             # <<<<<<<<<<<<<<
  *             block_data = reader.read( size )
  *             # Might need to uncompress
  */
-    __pyx_t_5 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__seek); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__seek); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_offset);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_offset);
     __Pyx_GIVEREF(__pyx_v_offset);
-    __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":211
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":217
  *             # Seek to and read all data for the block
  *             reader.seek( offset )
  *             block_data = reader.read( size )             # <<<<<<<<<<<<<<
  *             # Might need to uncompress
  *             if self.bbi_file.uncompress_buf_size > 0:
  */
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_size);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size);
     __Pyx_GIVEREF(__pyx_v_size);
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_v_block_data = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":213
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":219
  *             block_data = reader.read( size )
  *             # Might need to uncompress
  *             if self.bbi_file.uncompress_buf_size > 0:             # <<<<<<<<<<<<<<
     __pyx_t_7 = (((struct __pyx_obj_2bx_3bbi_8bbi_file_ZoomLevel *)__pyx_v_self)->bbi_file->uncompress_buf_size > 0);
     if (__pyx_t_7) {
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":215
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":221
  *             if self.bbi_file.uncompress_buf_size > 0:
  *                 ## block_data = zlib.decompress( block_data, buf_size = self.bbi_file.uncompress_buf_size )
  *                 block_data = zlib.decompress( block_data )             # <<<<<<<<<<<<<<
  *             block_size = len( block_data )
  *             # The block should be a bunch of summaries.
  */
-      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__zlib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__zlib); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__decompress); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__decompress); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_INCREF(__pyx_v_block_data);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_block_data);
       __Pyx_GIVEREF(__pyx_v_block_data);
-      __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     }
     __pyx_L8:;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":216
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":222
  *                 ## block_data = zlib.decompress( block_data, buf_size = self.bbi_file.uncompress_buf_size )
  *                 block_data = zlib.decompress( block_data )
  *             block_size = len( block_data )             # <<<<<<<<<<<<<<
  *             # The block should be a bunch of summaries.
  *             assert block_size % summary_on_disk_size == 0
  */
-    __pyx_t_8 = PyObject_Length(__pyx_v_block_data); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = PyObject_Length(__pyx_v_block_data); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_v_block_size);
     __pyx_v_block_size = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":218
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":224
  *             block_size = len( block_data )
  *             # The block should be a bunch of summaries.
  *             assert block_size % summary_on_disk_size == 0             # <<<<<<<<<<<<<<
  *             # Create another reader just for the block, shouldn't be too expensive
  */
     #ifndef PYREX_WITHOUT_ASSERTIONS
-    __pyx_t_2 = PyNumber_Remainder(__pyx_v_block_size, __pyx_int_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyNumber_Remainder(__pyx_v_block_size, __pyx_int_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (unlikely(!__pyx_t_7)) {
       PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
     #endif
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":219
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":225
  *             # The block should be a bunch of summaries.
  *             assert block_size % summary_on_disk_size == 0
  *             item_count = block_size / summary_on_disk_size             # <<<<<<<<<<<<<<
  *             # Create another reader just for the block, shouldn't be too expensive
  *             block_reader = BinaryFileReader( StringIO( block_data ), is_little_endian=reader.is_little_endian )
  */
-    __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_block_size, __pyx_int_32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_block_size, __pyx_int_32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_v_item_count);
     __pyx_v_item_count = __pyx_t_5;
     __pyx_t_5 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":221
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":227
  *             item_count = block_size / summary_on_disk_size
  *             # Create another reader just for the block, shouldn't be too expensive
  *             block_reader = BinaryFileReader( StringIO( block_data ), is_little_endian=reader.is_little_endian )             # <<<<<<<<<<<<<<
  *             for i from 0 <= i < item_count:
  *                 ## NOTE: Look carefully at bbiRead again to be sure the endian
  */
-    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__BinaryFileReader); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__BinaryFileReader); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__StringIO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__StringIO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_block_data);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_block_data);
     __Pyx_GIVEREF(__pyx_v_block_data);
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
     __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__is_little_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reader, __pyx_n_s__is_little_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__is_little_endian), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__is_little_endian), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_v_block_reader = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":222
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":228
  *             # Create another reader just for the block, shouldn't be too expensive
  *             block_reader = BinaryFileReader( StringIO( block_data ), is_little_endian=reader.is_little_endian )
  *             for i from 0 <= i < item_count:             # <<<<<<<<<<<<<<
  *                 ## NOTE: Look carefully at bbiRead again to be sure the endian
  *                 ##       conversion here is all correct. It looks like it is
  */
-    __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_item_count); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_item_count); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":226
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":232
  *                 ##       conversion here is all correct. It looks like it is
  *                 ##       just pushing raw data into memory and not swapping
  *                 summary = SummaryBlock()             # <<<<<<<<<<<<<<
  *                 summary.chrom_id = block_reader.read_uint32()
  *                 summary.start = block_reader.read_uint32()
  */
-      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_3bbi_8bbi_file_SummaryBlock)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_3bbi_8bbi_file_SummaryBlock)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(((PyObject *)__pyx_v_summary));
       __pyx_v_summary = ((struct __pyx_obj_2bx_3bbi_8bbi_file_SummaryBlock *)__pyx_t_2);
       __pyx_t_2 = 0;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":227
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":233
  *                 ##       just pushing raw data into memory and not swapping
  *                 summary = SummaryBlock()
  *                 summary.chrom_id = block_reader.read_uint32()             # <<<<<<<<<<<<<<
  *                 summary.start = block_reader.read_uint32()
  *                 summary.end = block_reader.read_uint32()
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __pyx_v_summary->chrom_id = __pyx_t_10;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":228
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":234
  *                 summary = SummaryBlock()
  *                 summary.chrom_id = block_reader.read_uint32()
  *                 summary.start = block_reader.read_uint32()             # <<<<<<<<<<<<<<
  *                 summary.end = block_reader.read_uint32()
  *                 summary.valid_count = block_reader.read_uint32()
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __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 = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_v_summary->start = __pyx_t_10;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":229
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":235
  *                 summary.chrom_id = block_reader.read_uint32()
  *                 summary.start = block_reader.read_uint32()
  *                 summary.end = block_reader.read_uint32()             # <<<<<<<<<<<<<<
  *                 summary.valid_count = block_reader.read_uint32()
  *                 summary.min_val = block_reader.read_float()
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __pyx_v_summary->end = __pyx_t_10;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":230
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":236
  *                 summary.start = block_reader.read_uint32()
  *                 summary.end = block_reader.read_uint32()
  *                 summary.valid_count = block_reader.read_uint32()             # <<<<<<<<<<<<<<
  *                 summary.min_val = block_reader.read_float()
  *                 summary.max_val = block_reader.read_float()
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_uint32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __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 = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_v_summary->valid_count = __pyx_t_10;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":231
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":237
  *                 summary.end = block_reader.read_uint32()
  *                 summary.valid_count = block_reader.read_uint32()
  *                 summary.min_val = block_reader.read_float()             # <<<<<<<<<<<<<<
  *                 summary.max_val = block_reader.read_float()
  *                 summary.sum_data = block_reader.read_float()
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __pyx_v_summary->min_val = __pyx_t_11;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":232
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":238
  *                 summary.valid_count = block_reader.read_uint32()
  *                 summary.min_val = block_reader.read_float()
  *                 summary.max_val = block_reader.read_float()             # <<<<<<<<<<<<<<
  *                 summary.sum_data = block_reader.read_float()
  *                 summary.sum_squares = block_reader.read_float()
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_v_summary->max_val = __pyx_t_11;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":233
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":239
  *                 summary.min_val = block_reader.read_float()
  *                 summary.max_val = block_reader.read_float()
  *                 summary.sum_data = block_reader.read_float()             # <<<<<<<<<<<<<<
  *                 summary.sum_squares = block_reader.read_float()
  *                 rval.append( summary )
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __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 = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __pyx_v_summary->sum_data = __pyx_t_11;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":234
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":240
  *                 summary.max_val = block_reader.read_float()
  *                 summary.sum_data = block_reader.read_float()
  *                 summary.sum_squares = block_reader.read_float()             # <<<<<<<<<<<<<<
  *                 rval.append( summary )
  *         return rval
  */
-      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_GetAttr(__pyx_v_block_reader, __pyx_n_s__read_float); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __pyx_v_summary->sum_squares = __pyx_t_11;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":235
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":241
  *                 summary.sum_data = block_reader.read_float()
  *                 summary.sum_squares = block_reader.read_float()
  *                 rval.append( summary )             # <<<<<<<<<<<<<<
  * 
  */
       if (unlikely(__pyx_v_rval == Py_None)) {
-        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
+        PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
       }
-      __pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_rval), ((PyObject *)__pyx_v_summary)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_rval), ((PyObject *)__pyx_v_summary)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
   }
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":236
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":242
  *                 summary.sum_squares = block_reader.read_float()
  *                 rval.append( summary )
  *         return rval             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":238
+/* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":244
  *         return rval
  * 
  *     cdef _get_summary_slice( self, bits32 base_start, bits32 base_end, summaries ):             # <<<<<<<<<<<<<<
   __Pyx_RefNannySetupContext("_get_summary_slice");
   __pyx_v_summary = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":239
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":245
  * 
  *     cdef _get_summary_slice( self, bits32 base_start, bits32 base_end, summaries ):
  *         cdef float valid_count = 0             # <<<<<<<<<<<<<<
  */
   __pyx_v_valid_count = 0.0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":240
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":246
  *     cdef _get_summary_slice( self, bits32 base_start, bits32 base_end, summaries ):
  *         cdef float valid_count = 0
  *         cdef float sum_data = 0.0             # <<<<<<<<<<<<<<
  */
   __pyx_v_sum_data = 0.0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":241
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":247
  *         cdef float valid_count = 0
  *         cdef float sum_data = 0.0
  *         cdef float sum_squares = 0.0             # <<<<<<<<<<<<<<
  */
   __pyx_v_sum_squares = 0.0;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":242
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":248
  *         cdef float sum_data = 0.0
  *         cdef float sum_squares = 0.0
  *         cdef float min_val = numpy.nan             # <<<<<<<<<<<<<<
  *         cdef float max_val = numpy.nan
  *         cdef float overlap_factor
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __pyx_v_min_val = __pyx_t_3;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":243
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":249
  *         cdef float sum_squares = 0.0
  *         cdef float min_val = numpy.nan
  *         cdef float max_val = numpy.nan             # <<<<<<<<<<<<<<
  *         cdef float overlap_factor
  *         cdef int overlap
  */
-  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__nan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_max_val = __pyx_t_3;
 
-  /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":247
+  /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":253
  *         cdef int overlap
  * 
  *         if summaries:             # <<<<<<<<<<<<<<
  * 
  *             min_val = summaries[0].min_val
  */
-  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_summaries); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_summaries); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_4) {
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":249
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":255
  *         if summaries:
  * 
  *             min_val = summaries[0].min_val             # <<<<<<<<<<<<<<
  *             max_val = summaries[0].max_val
  * 
  */
-    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_summaries, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_summaries, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__min_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__min_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __pyx_v_min_val = __pyx_t_3;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":250
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":256
  * 
  *             min_val = summaries[0].min_val
  *             max_val = summaries[0].max_val             # <<<<<<<<<<<<<<
  * 
  *             for summary in summaries:
  */
-    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_summaries, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_summaries, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__max_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__max_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_v_max_val = __pyx_t_3;
 
-    /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":252
+    /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":258
  *             max_val = summaries[0].max_val
  * 
  *             for summary in summaries:             # <<<<<<<<<<<<<<
     if (PyList_CheckExact(__pyx_v_summaries) || PyTuple_CheckExact(__pyx_v_summaries)) {
       __pyx_t_5 = 0; __pyx_t_1 = __pyx_v_summaries; __Pyx_INCREF(__pyx_t_1);
     } else {
-      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_summaries); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_summaries); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
     }
     for (;;) {
       } else {
         __pyx_t_2 = PyIter_Next(__pyx_t_1);
         if (!__pyx_t_2) {
-          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           break;
         }
         __Pyx_GOTREF(__pyx_t_2);
       __pyx_v_summary = __pyx_t_2;
       __pyx_t_2 = 0;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":253
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":259
  * 
  *             for summary in summaries:
  *                 if summary.start >= base_end:             # <<<<<<<<<<<<<<
  *                     break
  * 
  */
-      __pyx_t_2 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_6 = PyLong_FromUnsignedLong(__pyx_v_base_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyLong_FromUnsignedLong(__pyx_v_base_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       if (__pyx_t_4) {
 
-        /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":254
+        /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":260
  *             for summary in summaries:
  *                 if summary.start >= base_end:
  *                     break             # <<<<<<<<<<<<<<
       }
       __pyx_L6:;
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":256
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":262
  *                     break
  * 
  *                 overlap = range_intersection( base_start, base_end, summary.start, summary.end )             # <<<<<<<<<<<<<<
  *                 if overlap > 0:
  *                     overlap_factor = <double> overlap / (summary.end - summary.start)
  */
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__start); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__start); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_t_7 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
-      __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_v_overlap = __pyx_f_2bx_3bbi_8bbi_file_range_intersection(__pyx_v_base_start, __pyx_v_base_end, __pyx_t_8, __pyx_t_9);
 
-      /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":257
+      /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":263
  * 
  *                 overlap = range_intersection( base_start, base_end, summary.start, summary.end )
  *                 if overlap > 0:             # <<<<<<<<<<<<<<
       __pyx_t_4 = (__pyx_v_overlap > 0);
       if (__pyx_t_4) {
 
-        /* "/Users/Kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":258
+        /* "/Users/kanwei/bx-python/lib/bx/bbi/bbi_file.pyx":264
  *                 overlap = range_intersection( base_start, base_end, summary.start, summary.end )
  *                 if overlap > 0:
  *                     overlap_factor = <double> overlap / (summary.end - summary.start)             # <<<<<<<<<<<<<<
  * 
  *                     valid_count += summary.valid_count * overlap_factor
  */
-        __pyx_t_7 = PyFloat_FromDouble(((double)__pyx_v_overlap)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyFloat_FromDouble(((double)__pyx_v_overlap)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_7);
-        __pyx_t_6 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = PyObject_GetAttr(__pyx_v_summary, __pyx_n_s__end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__