Commits

Anonymous committed cc8b30d Merge

merged changes from trunk

Comments (0)

Files changed (7)

lib/bx/align/sitemask/cpg.py

         
     def __call__( self, block ):
         if not block: return block
+        if len(block.components) < 2:
+            return
         cpglist = list_cpg_restricted( \
             string.upper(block.components[0].text), \
             string.upper(block.components[1].text) )
         
     def __call__( self, block ):
         if not block: return block
+        if len(block.components) < 2:
+            return
         cpglist = list_cpg( \
             string.upper(block.components[0].text), \
             string.upper(block.components[1].text) )
         
     def __call__( self, block ):
         if not block: return block
+        if len(block.components) < 2:
+            return
         noncpglist = list_non_cpg( \
             string.upper(block.components[0].text), \
             string.upper(block.components[1].text) )

lib/bx/arrays/array_tree.c

-/* Generated by Cython 0.11.1 on Thu May 14 17:22:27 2009 */
+/* Generated by Cython 0.11.1 on Fri May 29 15:38:40 2009 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
 };
 
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":152
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":158
  *         return tree
  * 
  * cdef class ArrayTreeNode:             # <<<<<<<<<<<<<<
 static PyObject *__pyx_kp___init__;
 static char __pyx_k___setitem__[] = "__setitem__";
 static PyObject *__pyx_kp___setitem__;
+static char __pyx_k_set_range[] = "set_range";
+static PyObject *__pyx_kp_set_range;
 static char __pyx_k___getitem__[] = "__getitem__";
 static PyObject *__pyx_kp___getitem__;
 static char __pyx_k_to_file[] = "to_file";
 static PyObject *__pyx_kp_dtype;
 static char __pyx_k_index[] = "index";
 static PyObject *__pyx_kp_index;
+static char __pyx_k_start[] = "start";
+static PyObject *__pyx_kp_start;
+static char __pyx_k_end[] = "end";
+static PyObject *__pyx_kp_end;
 static char __pyx_k_f[] = "f";
 static PyObject *__pyx_kp_f;
 static char __pyx_k_s[] = "s";
 static PyObject *__pyx_kp_VERSION;
 static char __pyx_k_26[] = "float32";
 static PyObject *__pyx_kp_26;
+static char __pyx_k_range[] = "range";
+static PyObject *__pyx_kp_range;
 static char __pyx_k_magic[] = "magic";
 static PyObject *__pyx_kp_magic;
 static char __pyx_k_29[] = "write_uint32";
 static PyObject *__pyx_kp_write;
 static char __pyx_k_char[] = "char";
 static PyObject *__pyx_kp_char;
-static char __pyx_k_range[] = "range";
-static PyObject *__pyx_kp_range;
 static char __pyx_k_31[] = "read_uint32";
 static PyObject *__pyx_kp_31;
 static char __pyx_k_read[] = "read";
 static char __pyx_k_21[] = "Format string allocated too short.";
 static char __pyx_k_22[] = "unknown dtype code in numpy.pxd (%d)";
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":91
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":92
  *     cdef object dtype
  *     cdef int levels
  *     cdef public ArrayTreeNode root             # <<<<<<<<<<<<<<
 static int __pyx_pf_2bx_6arrays_10array_tree_9ArrayTree_4root___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_SetupRefcountContext("__set__");
-  if (!(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_INCREF(__pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
   __Pyx_GOTREF(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root);
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":93
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":94
  *     cdef public ArrayTreeNode root
  * 
  *     def __init__( self, int max, int block_size, dtype=float32 ):             # <<<<<<<<<<<<<<
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_block_size);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  2:
       if (kw_args > 1) {
       }
     }
     if (unlikely(kw_args > 0)) {
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     }
-    __pyx_v_max = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_block_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_max = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_block_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     __pyx_v_dtype = values[2];
   } else {
     __pyx_v_dtype = __pyx_k_27;
       case  3:
       __pyx_v_dtype = PyTuple_GET_ITEM(__pyx_args, 2);
       case  2:
-      __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      __pyx_v_max = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_v_max = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       break;
       default: goto __pyx_L5_argtuple_error;
     }
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("bx.arrays.array_tree.ArrayTree.__init__");
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":97
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":98
  *         Create a new array tree of size `max`
  *         """
  *         self.max = max             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->max = __pyx_v_max;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":98
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":99
  *         """
  *         self.max = max
  *         self.block_size = block_size             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->block_size = __pyx_v_block_size;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":100
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":101
  *         self.block_size = block_size
  *         # Force the dtype argument to its canonical dtype object
  *         self.dtype = numpy.dtype( dtype )             # <<<<<<<<<<<<<<
  *         # How many levels are needed to cover the entire range?
  *         self.levels = 0
  */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_dtype);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype);
   __Pyx_GIVEREF(__pyx_v_dtype);
-  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_GIVEREF(__pyx_t_2);
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->dtype = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":102
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":103
  *         self.dtype = numpy.dtype( dtype )
  *         # How many levels are needed to cover the entire range?
  *         self.levels = 0             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":103
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":104
  *         # How many levels are needed to cover the entire range?
  *         self.levels = 0
  *         while self.block_size ** ( self.levels + 1 ) < self.max:             # <<<<<<<<<<<<<<
     __pyx_t_3 = (__Pyx_pow_long(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->block_size, (((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels + 1)) < ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->max);
     if (!__pyx_t_3) break;
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":104
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":105
  *         self.levels = 0
  *         while self.block_size ** ( self.levels + 1 ) < self.max:
  *             self.levels += 1             # <<<<<<<<<<<<<<
     ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels += 1;
   }
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":106
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":107
  *             self.levels += 1
  *         # Not yet dealing with the case where the root is a Leaf
  *         assert self.levels > 0, "max < block_size not yet handled"             # <<<<<<<<<<<<<<
   #ifndef PYREX_WITHOUT_ASSERTIONS
   if (unlikely(!(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels > 0))) {
     PyErr_SetObject(PyExc_AssertionError, __pyx_kp_28);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   #endif
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":108
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":109
  *         assert self.levels > 0, "max < block_size not yet handled"
  *         # Create the root node
  *         self.root = ArrayTreeNode( self, 0, max, block_size, self.levels )             # <<<<<<<<<<<<<<
  * 
  *     def __setitem__( self, int index, value ):
  */
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_max); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromLong(__pyx_v_max); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_5));
   __Pyx_INCREF(__pyx_v_self);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
   __pyx_t_2 = 0;
   __pyx_t_1 = 0;
   __pyx_t_4 = 0;
-  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GIVEREF(__pyx_t_4);
   __Pyx_GOTREF(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root);
   __Pyx_DECREF(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root));
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":110
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":111
  *         self.root = ArrayTreeNode( self, 0, max, block_size, self.levels )
  * 
  *     def __setitem__( self, int index, value ):             # <<<<<<<<<<<<<<
   PyObject *__pyx_t_3 = NULL;
   __Pyx_SetupRefcountContext("__setitem__");
   assert(__pyx_arg_index); {
-    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L3_error:;
   return -1;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":111
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":112
  * 
  *     def __setitem__( self, int index, value ):
  *         self.root.set( index, value )             # <<<<<<<<<<<<<<
  * 
- *     def __getitem__( self, int index ):
- */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *     def set_range( self, int start, int end, value ):
+ */
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":113
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":114
  *         self.root.set( index, value )
  * 
+ *     def set_range( self, int start, int end, value ):             # <<<<<<<<<<<<<<
+ *         cdef int index
+ *         for index in range( start, end ):
+ */
+
+static PyObject *__pyx_pf_2bx_6arrays_10array_tree_9ArrayTree_set_range(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pf_2bx_6arrays_10array_tree_9ArrayTree_set_range(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  int __pyx_v_start;
+  int __pyx_v_end;
+  PyObject *__pyx_v_value = 0;
+  int __pyx_v_index;
+  PyObject *__pyx_r = NULL;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_start,&__pyx_kp_end,&__pyx_kp_value,0};
+  __Pyx_SetupRefcountContext("set_range");
+  if (unlikely(__pyx_kwds)) {
+    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+    PyObject* values[3] = {0,0,0};
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      case  0: break;
+      default: goto __pyx_L5_argtuple_error;
+    }
+    switch (PyTuple_GET_SIZE(__pyx_args)) {
+      case  0:
+      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_start);
+      if (likely(values[0])) kw_args--;
+      else goto __pyx_L5_argtuple_error;
+      case  1:
+      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_end);
+      if (likely(values[1])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("set_range", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+      case  2:
+      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_value);
+      if (likely(values[2])) kw_args--;
+      else {
+        __Pyx_RaiseArgtupleInvalid("set_range", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __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), "set_range") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    }
+    __pyx_v_start = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_end = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_value = values[2];
+  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+    goto __pyx_L5_argtuple_error;
+  } else {
+    __pyx_v_start = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_end = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 2);
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("set_range", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("bx.arrays.array_tree.ArrayTree.set_range");
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":116
+ *     def set_range( self, int start, int end, value ):
+ *         cdef int index
+ *         for index in range( start, end ):             # <<<<<<<<<<<<<<
+ *             self.root.set( index, value )
+ * 
+ */
+  for (__pyx_t_1 = __pyx_v_start; __pyx_t_1 < __pyx_v_end; __pyx_t_1+=1) {
+    __pyx_v_index = __pyx_t_1;
+
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":117
+ *         cdef int index
+ *         for index in range( start, end ):
+ *             self.root.set( index, value )             # <<<<<<<<<<<<<<
+ * 
+ *     def __getitem__( self, int index ):
+ */
+    __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_set); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("bx.arrays.array_tree.ArrayTree.set_range");
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_FinishRefcountContext();
+  return __pyx_r;
+}
+
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":119
+ *             self.root.set( index, value )
+ * 
  *     def __getitem__( self, int index ):             # <<<<<<<<<<<<<<
  *         return self.root.get( index )
  * 
   PyObject *__pyx_t_3 = NULL;
   __Pyx_SetupRefcountContext("__getitem__");
   assert(__pyx_arg_index); {
-    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L3_error:;
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":114
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":120
  * 
  *     def __getitem__( self, int index ):
  *         return self.root.get( index )             # <<<<<<<<<<<<<<
  *     def to_file( self, f ):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":116
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":122
  *         return self.root.get( index )
  * 
  *     def to_file( self, f ):             # <<<<<<<<<<<<<<
   __pyx_v_io = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_level = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":117
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":123
  * 
  *     def to_file( self, f ):
  *         io = BinaryFileWriter( f, magic=MAGIC )             # <<<<<<<<<<<<<<
  *         io.write_uint32( VERSION )
  *         io.write_uint32( self.max )
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_BinaryFileWriter); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_BinaryFileWriter); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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 = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_f);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f);
   __Pyx_GIVEREF(__pyx_v_f);
-  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_2));
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_MAGIC); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_MAGIC); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_3);
-  if (PyDict_SetItem(__pyx_2, __pyx_kp_magic, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_2, __pyx_kp_magic, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __pyx_v_io = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":118
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":124
  *     def to_file( self, f ):
  *         io = BinaryFileWriter( f, magic=MAGIC )
  *         io.write_uint32( VERSION )             # <<<<<<<<<<<<<<
  *         io.write_uint32( self.max )
  *         io.write_uint32( self.block_size )
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_29); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_29); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_VERSION); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_VERSION); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_3);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __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 = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_3);
   __Pyx_GIVEREF(__pyx_3);
   __pyx_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":119
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":125
  *         io = BinaryFileWriter( f, magic=MAGIC )
  *         io.write_uint32( VERSION )
  *         io.write_uint32( self.max )             # <<<<<<<<<<<<<<
  *         io.write_uint32( self.block_size )
  *         io.write( self.dtype.char )
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":120
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":126
  *         io.write_uint32( VERSION )
  *         io.write_uint32( self.max )
  *         io.write_uint32( self.block_size )             # <<<<<<<<<<<<<<
  *         io.write( self.dtype.char )
  *         io.write( "\0\0\0" )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_29); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_29); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->block_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->block_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __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 = 120; __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 = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":121
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":127
  *         io.write_uint32( self.max )
  *         io.write_uint32( self.block_size )
  *         io.write( self.dtype.char )             # <<<<<<<<<<<<<<
  *         io.write( "\0\0\0" )
  *         # Data pass, level order
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->dtype, __pyx_kp_char); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->dtype, __pyx_kp_char); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":122
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":128
  *         io.write_uint32( self.block_size )
  *         io.write( self.dtype.char )
  *         io.write( "\0\0\0" )             # <<<<<<<<<<<<<<
  *         # Data pass, level order
  *         for level in range( self.levels, -1, -1 ):
  */
-  __pyx_t_3 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __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 = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_kp_30);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_30);
   __Pyx_GIVEREF(__pyx_kp_30);
-  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":124
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":130
  *         io.write( "\0\0\0" )
  *         # Data pass, level order
  *         for level in range( self.levels, -1, -1 ):             # <<<<<<<<<<<<<<
  *             self.root.to_file_data_pass( io, level )
  *         # Offset pass to fix up indexes
  */
-  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->levels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_neg_1);
   __Pyx_GIVEREF(__pyx_int_neg_1);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
     __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
   } else {
-    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     } else {
       __pyx_t_2 = PyIter_Next(__pyx_t_1);
       if (!__pyx_t_2) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     __pyx_v_level = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":125
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":131
  *         # Data pass, level order
  *         for level in range( self.levels, -1, -1 ):
  *             self.root.to_file_data_pass( io, level )             # <<<<<<<<<<<<<<
  *         # Offset pass to fix up indexes
  *         self.root.to_file_offset_pass( io )
  */
-    __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_to_file_data_pass); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_to_file_data_pass); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
     __Pyx_INCREF(__pyx_v_io);
     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_io);
     __Pyx_INCREF(__pyx_v_level);
     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_level);
     __Pyx_GIVEREF(__pyx_v_level);
-    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":127
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":133
  *             self.root.to_file_data_pass( io, level )
  *         # Offset pass to fix up indexes
  *         self.root.to_file_offset_pass( io )             # <<<<<<<<<<<<<<
  * 
  *     @classmethod
  */
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_to_file_offset_pass); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)__pyx_v_self)->root), __pyx_kp_to_file_offset_pass); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __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 = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_5));
   __Pyx_INCREF(__pyx_v_io);
   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_io);
   __Pyx_GIVEREF(__pyx_v_io);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":130
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":136
  * 
  *     @classmethod
  *     def from_file( Class, f ):             # <<<<<<<<<<<<<<
   __pyx_v_dt = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_tree = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":131
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":137
  *     @classmethod
  *     def from_file( Class, f ):
  *         io = BinaryFileReader( f, magic=MAGIC )             # <<<<<<<<<<<<<<
  *         assert io.read_uint32() == VERSION
  *         max = io.read_uint32()
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_BinaryFileReader); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_BinaryFileReader); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __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 = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_f);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f);
   __Pyx_GIVEREF(__pyx_v_f);
-  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_2));
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_MAGIC); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_MAGIC); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_3);
-  if (PyDict_SetItem(__pyx_2, __pyx_kp_magic, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_2, __pyx_kp_magic, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __pyx_v_io = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":132
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":138
  *     def from_file( Class, f ):
  *         io = BinaryFileReader( f, magic=MAGIC )
  *         assert io.read_uint32() == VERSION             # <<<<<<<<<<<<<<
  *         block_size = io.read_uint32()
  */
   #ifndef PYREX_WITHOUT_ASSERTIONS
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_VERSION); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_VERSION); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_3);
-  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_3, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_3, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   if (unlikely(!__pyx_t_3)) {
     PyErr_SetNone(PyExc_AssertionError);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   #endif
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":133
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":139
  *         io = BinaryFileReader( f, magic=MAGIC )
  *         assert io.read_uint32() == VERSION
  *         max = io.read_uint32()             # <<<<<<<<<<<<<<
  *         block_size = io.read_uint32()
  *         dt = io.read( 1 )
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_max);
   __pyx_v_max = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":134
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":140
  *         assert io.read_uint32() == VERSION
  *         max = io.read_uint32()
  *         block_size = io.read_uint32()             # <<<<<<<<<<<<<<
  *         dt = io.read( 1 )
  *         io.read( 3 )
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_v_block_size);
   __pyx_v_block_size = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":135
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":141
  *         max = io.read_uint32()
  *         block_size = io.read_uint32()
  *         dt = io.read( 1 )             # <<<<<<<<<<<<<<
  *         io.read( 3 )
  *         tree = Class( max, block_size, dt )
  */
-  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __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 = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_int_1);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
   __Pyx_GIVEREF(__pyx_int_1);
-  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __pyx_v_dt = __pyx_t_4;
   __pyx_t_4 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":136
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":142
  *         block_size = io.read_uint32()
  *         dt = io.read( 1 )
  *         io.read( 3 )             # <<<<<<<<<<<<<<
  *         tree = Class( max, block_size, dt )
  *         tree.root.from_file( io )
  */
-  __pyx_t_4 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(__pyx_v_io, __pyx_kp_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __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 = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
-  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":137
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":143
  *         dt = io.read( 1 )
  *         io.read( 3 )
  *         tree = Class( max, block_size, dt )             # <<<<<<<<<<<<<<
  *         tree.root.from_file( io )
  *         return tree
  */
-  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_v_max);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_max);
   __Pyx_INCREF(__pyx_v_dt);
   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_dt);
   __Pyx_GIVEREF(__pyx_v_dt);
-  __pyx_t_1 = PyObject_Call(__pyx_v_Class, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_v_Class, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_v_tree);
   __pyx_v_tree = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":138
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":144
  *         io.read( 3 )
  *         tree = Class( max, block_size, dt )
  *         tree.root.from_file( io )             # <<<<<<<<<<<<<<
  *         return tree
  * 
  */
-  __pyx_t_1 = PyObject_GetAttr(__pyx_v_tree, __pyx_kp_root); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_tree, __pyx_kp_root); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_from_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_from_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __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 = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_v_io);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_io);
   __Pyx_GIVEREF(__pyx_v_io);
-  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":139
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":145
  *         tree = Class( max, block_size, dt )
  *         tree.root.from_file( io )
  *         return tree             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":142
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":148
  * 
  *     @classmethod
  *     def from_sequence( Class, s, block_size=1000 ):             # <<<<<<<<<<<<<<
       }
     }
     if (unlikely(kw_args > 0)) {
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "from_sequence") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "from_sequence") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     }
     __pyx_v_s = values[0];
     __pyx_v_block_size = values[1];
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("from_sequence", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("from_sequence", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("bx.arrays.array_tree.ArrayTree.from_sequence");
   return NULL;
   __pyx_v_tree = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":147
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":153
  *         length and getitem).
  *         """
  *         tree = Class( len( s ), block_size )             # <<<<<<<<<<<<<<
  *         for i in range( len( s ) ):
  *             tree[i] = s[i]
  */
-  __pyx_t_1 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_block_size);
   __Pyx_GIVEREF(__pyx_v_block_size);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_v_Class, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_v_Class, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_v_tree);
   __pyx_v_tree = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":148
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":154
  *         """
  *         tree = Class( len( s ), block_size )
  *         for i in range( len( s ) ):             # <<<<<<<<<<<<<<
  *             tree[i] = s[i]
  *         return tree
  */
-  __pyx_t_4 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __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 = 148; __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 = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
   __Pyx_GIVEREF(__pyx_t_2);
   __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
     __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
   } else {
-    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     } else {
       __pyx_t_2 = PyIter_Next(__pyx_t_3);
       if (!__pyx_t_2) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
       __Pyx_GOTREF(__pyx_t_2);
     __pyx_v_i = __pyx_t_2;
     __pyx_t_2 = 0;
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":149
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":155
  *         tree = Class( len( s ), block_size )
  *         for i in range( len( s ) ):
  *             tree[i] = s[i]             # <<<<<<<<<<<<<<
  *         return tree
  * 
  */
-    __pyx_1 = PyObject_GetItem(__pyx_v_s, __pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_1 = PyObject_GetItem(__pyx_v_s, __pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_1);
-    if (PyObject_SetItem(__pyx_v_tree, __pyx_v_i, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyObject_SetItem(__pyx_v_tree, __pyx_v_i, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":150
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":156
  *         for i in range( len( s ) ):
  *             tree[i] = s[i]
  *         return tree             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":165
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":171
  *     cdef int child_size
  *     cdef object children
  *     cdef public Summary summary             # <<<<<<<<<<<<<<
 static int __pyx_pf_2bx_6arrays_10array_tree_13ArrayTreeNode_7summary___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_SetupRefcountContext("__set__");
-  if (!(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_2bx_6arrays_10array_tree_Summary))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_2bx_6arrays_10array_tree_Summary))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_INCREF(__pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
   __Pyx_GOTREF(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->summary);
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":168
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":174
  *     cdef public long start_offset
  * 
  *     def __init__( self, ArrayTree tree, int min, int max, int block_size, int level ):             # <<<<<<<<<<<<<<
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_min);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  2:
       values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_max);
       if (likely(values[2])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  3:
       values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_block_size);
       if (likely(values[3])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  4:
       values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_level);
       if (likely(values[4])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __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), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     }
     __pyx_v_tree = ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)values[0]);
-    __pyx_v_min = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_max = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_block_size = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_level = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_min = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_max = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_block_size = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_level = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
     goto __pyx_L5_argtuple_error;
   } else {
     __pyx_v_tree = ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTree *)PyTuple_GET_ITEM(__pyx_args, 0));
-    __pyx_v_min = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_max = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_min = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_max = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_max == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("bx.arrays.array_tree.ArrayTreeNode.__init__");
   return -1;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tree), __pyx_ptype_2bx_6arrays_10array_tree_ArrayTree, 1, "tree", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":169
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tree), __pyx_ptype_2bx_6arrays_10array_tree_ArrayTree, 1, "tree", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":175
  * 
  *     def __init__( self, ArrayTree tree, int min, int max, int block_size, int level ):
  *         self.tree = tree             # <<<<<<<<<<<<<<
   __Pyx_DECREF(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->tree));
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->tree = __pyx_v_tree;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":170
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":176
  *     def __init__( self, ArrayTree tree, int min, int max, int block_size, int level ):
  *         self.tree = tree
  *         self.min = min             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->min = __pyx_v_min;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":171
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":177
  *         self.tree = tree
  *         self.min = min
  *         self.max = max             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->max = __pyx_v_max;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":172
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":178
  *         self.min = min
  *         self.max = max
  *         self.block_size = block_size             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->block_size = __pyx_v_block_size;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":173
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":179
  *         self.max = max
  *         self.block_size = block_size
  *         self.level = level             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->level = __pyx_v_level;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":175
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":181
  *         self.level = level
  *         # Each of my children represents block_size ** level values
  *         self.child_size = self.block_size ** self.level             # <<<<<<<<<<<<<<
  */
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->child_size = __Pyx_pow_int(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->block_size, ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->level);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":176
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":182
  *         # Each of my children represents block_size ** level values
  *         self.child_size = self.block_size ** self.level
  *         self.children = [None] * self.block_size             # <<<<<<<<<<<<<<
  *         self.summary = None
  *         self.start_offset = 0
  */
-  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(Py_None);
   PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
   __Pyx_GIVEREF(Py_None);
-  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->block_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->block_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":177
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":183
  *         self.child_size = self.block_size ** self.level
  *         self.children = [None] * self.block_size
  *         self.summary = None             # <<<<<<<<<<<<<<
   __Pyx_DECREF(((PyObject *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->summary));
   ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->summary = ((struct __pyx_obj_2bx_6arrays_10array_tree_Summary *)Py_None);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":178
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":184
  *         self.children = [None] * self.block_size
  *         self.summary = None
  *         self.start_offset = 0             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":180
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":186
  *         self.start_offset = 0
  * 
  *     cdef inline init_bin( self, int index ):             # <<<<<<<<<<<<<<
   PyObject *__pyx_t_6 = NULL;
   __Pyx_SetupRefcountContext("init_bin");
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":181
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":187
  * 
  *     cdef inline init_bin( self, int index ):
  *         cdef int min = self.min + ( index * self.child_size )             # <<<<<<<<<<<<<<
  */
   __pyx_v_min = (__pyx_v_self->min + (__pyx_v_index * __pyx_v_self->child_size));
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":182
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":188
  *     cdef inline init_bin( self, int index ):
  *         cdef int min = self.min + ( index * self.child_size )
  *         cdef int max = min + self.child_size             # <<<<<<<<<<<<<<
  */
   __pyx_v_max = (__pyx_v_min + __pyx_v_self->child_size);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":183
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":189
  *         cdef int min = self.min + ( index * self.child_size )
  *         cdef int max = min + self.child_size
  *         if self.level == 1:             # <<<<<<<<<<<<<<
   __pyx_t_1 = (__pyx_v_self->level == 1);
   if (__pyx_t_1) {
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":184
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":190
  *         cdef int max = min + self.child_size
  *         if self.level == 1:
  *             self.children[ index ] = ArrayTreeLeaf( self.tree, min, max )             # <<<<<<<<<<<<<<
  *         else:
  *             self.children[ index ] = ArrayTreeNode( self.tree, min, max, self.block_size, self.level - 1 )
  */
-    __pyx_t_2 = PyInt_FromLong(__pyx_v_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyInt_FromLong(__pyx_v_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyInt_FromLong(__pyx_v_max); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyInt_FromLong(__pyx_v_max); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
     __Pyx_INCREF(((PyObject *)__pyx_v_self->tree));
     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->tree));
     __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_2 = 0;
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeLeaf)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeLeaf)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-    if (__Pyx_SetItemInt(__pyx_v_self->children, __pyx_v_index, __pyx_t_3, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_SetItemInt(__pyx_v_self->children, __pyx_v_index, __pyx_t_3, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":186
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":192
  *             self.children[ index ] = ArrayTreeLeaf( self.tree, min, max )
  *         else:
  *             self.children[ index ] = ArrayTreeNode( self.tree, min, max, self.block_size, self.level - 1 )             # <<<<<<<<<<<<<<
  * 
  *     def set( self, int index, value ):
  */
-    __pyx_t_3 = PyInt_FromLong(__pyx_v_min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyInt_FromLong(__pyx_v_min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyInt_FromLong(__pyx_v_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyInt_FromLong(__pyx_v_max); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_2 = PyInt_FromLong(__pyx_v_self->block_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyInt_FromLong(__pyx_v_self->block_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_5 = PyInt_FromLong((__pyx_v_self->level - 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyInt_FromLong((__pyx_v_self->level - 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
     __Pyx_INCREF(((PyObject *)__pyx_v_self->tree));
     PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self->tree));
     __pyx_t_4 = 0;
     __pyx_t_2 = 0;
     __pyx_t_5 = 0;
-    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2bx_6arrays_10array_tree_ArrayTreeNode)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
-    if (__Pyx_SetItemInt(__pyx_v_self->children, __pyx_v_index, __pyx_t_5, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_SetItemInt(__pyx_v_self->children, __pyx_v_index, __pyx_t_5, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   }
   __pyx_L3:;
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":188
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":194
  *             self.children[ index ] = ArrayTreeNode( self.tree, min, max, self.block_size, self.level - 1 )
  * 
  *     def set( self, int index, value ):             # <<<<<<<<<<<<<<
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_value);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __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), "set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     }
-    __pyx_v_index = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_index = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     __pyx_v_value = values[1];
   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
     goto __pyx_L5_argtuple_error;
   } else {
-    __pyx_v_index = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_index = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("bx.arrays.array_tree.ArrayTreeNode.set");
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":189
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":195
  * 
  *     def set( self, int index, value ):
  *         cdef int bin_index = ( index - self.min ) // ( self.child_size )             # <<<<<<<<<<<<<<
  */
   __pyx_v_bin_index = ((__pyx_v_index - ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->min) / ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->child_size);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":190
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":196
  *     def set( self, int index, value ):
  *         cdef int bin_index = ( index - self.min ) // ( self.child_size )
  *         if self.children[ bin_index ] is None:             # <<<<<<<<<<<<<<
  *             self.init_bin( bin_index )
  *         self.children[ bin_index ].set( index, value )
  */
-  __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
   __pyx_t_1 = (__pyx_1 == Py_None);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_t_1) {
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":191
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":197
  *         cdef int bin_index = ( index - self.min ) // ( self.child_size )
  *         if self.children[ bin_index ] is None:
  *             self.init_bin( bin_index )             # <<<<<<<<<<<<<<
  *         self.children[ bin_index ].set( index, value )
  * 
  */
-    __pyx_t_2 = ((struct __pyx_vtabstruct_2bx_6arrays_10array_tree_ArrayTreeNode *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->__pyx_vtab)->init_bin(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self), __pyx_v_bin_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((struct __pyx_vtabstruct_2bx_6arrays_10array_tree_ArrayTreeNode *)((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->__pyx_vtab)->init_bin(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self), __pyx_v_bin_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":192
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":198
  *         if self.children[ bin_index ] is None:
  *             self.init_bin( bin_index )
  *         self.children[ bin_index ].set( index, value )             # <<<<<<<<<<<<<<
  * 
  *     def get( self, int index ):
  */
-  __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_set); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_set); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
   __Pyx_GIVEREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
   __Pyx_GIVEREF(__pyx_v_value);
   __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":194
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":200
  *         self.children[ bin_index ].set( index, value )
  * 
  *     def get( self, int index ):             # <<<<<<<<<<<<<<
   PyObject *__pyx_t_4 = NULL;
   __Pyx_SetupRefcountContext("get");
   assert(__pyx_arg_index); {
-    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L3_error:;
   return NULL;
   __pyx_L4_argument_unpacking_done:;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":195
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":201
  * 
  *     def get( self, int index ):
  *         cdef int bin_index = ( index - self.min ) //( self.child_size )             # <<<<<<<<<<<<<<
  */
   __pyx_v_bin_index = ((__pyx_v_index - ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->min) / ((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->child_size);
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":196
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":202
  *     def get( self, int index ):
  *         cdef int bin_index = ( index - self.min ) //( self.child_size )
  *         if self.children[ bin_index ] is None:             # <<<<<<<<<<<<<<
  *             return nan
  *         else:
  */
-  __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
   __pyx_t_1 = (__pyx_1 == Py_None);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_t_1) {
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":197
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":203
  *         cdef int bin_index = ( index - self.min ) //( self.child_size )
  *         if self.children[ bin_index ] is None:
  *             return nan             # <<<<<<<<<<<<<<
  *             return self.children[ bin_index ].get( index )
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_nan); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_nan); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_1);
     __pyx_r = __pyx_1;
     __pyx_1 = 0;
   }
   /*else*/ {
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":199
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":205
  *             return nan
  *         else:
  *             return self.children[ bin_index ].get( index )             # <<<<<<<<<<<<<<
  *     cpdef build_summary( self ):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2bx_6arrays_10array_tree_ArrayTreeNode *)__pyx_v_self)->children, __pyx_v_bin_index, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_1);
-    __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_3 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyInt_FromLong(__pyx_v_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
     __Pyx_GIVEREF(__pyx_t_3);
     __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
   return __pyx_r;
 }
 
-/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":201
+/* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":207
  *             return self.children[ bin_index ].get( index )
  * 
  *     cpdef build_summary( self ):             # <<<<<<<<<<<<<<
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_build_summary); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_kp_build_summary); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_1);
     if (!PyCFunction_Check(__pyx_1) || (PyCFunction_GET_FUNCTION(__pyx_1) != (void *)&__pyx_pf_2bx_6arrays_10array_tree_13ArrayTreeNode_build_summary)) {
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
       __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
       __pyx_r = __pyx_t_1;
     __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   }
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":205
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":211
  *         Build summary of children.
  *         """
  *         counts = empty( self.tree.block_size, self.tree.dtype )             # <<<<<<<<<<<<<<
  *         mins = empty( self.tree.block_size, self.tree.dtype )
  *         maxs = empty( self.tree.block_size, self.tree.dtype )
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); 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 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->tree->dtype);
   __Pyx_GIVEREF(__pyx_v_self->tree->dtype);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_v_counts = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":206
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":212
  *         """
  *         counts = empty( self.tree.block_size, self.tree.dtype )
  *         mins = empty( self.tree.block_size, self.tree.dtype )             # <<<<<<<<<<<<<<
  *         maxs = empty( self.tree.block_size, self.tree.dtype )
  *         sums = empty( self.tree.block_size, self.tree.dtype )
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->tree->dtype);
   __Pyx_GIVEREF(__pyx_v_self->tree->dtype);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_v_mins = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":207
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":213
  *         counts = empty( self.tree.block_size, self.tree.dtype )
  *         mins = empty( self.tree.block_size, self.tree.dtype )
  *         maxs = empty( self.tree.block_size, self.tree.dtype )             # <<<<<<<<<<<<<<
  *         sums = empty( self.tree.block_size, self.tree.dtype )
  *         sumsquares = empty( self.tree.block_size, self.tree.dtype )
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); 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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->tree->dtype);
   __Pyx_GIVEREF(__pyx_v_self->tree->dtype);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_v_maxs = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":208
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":214
  *         mins = empty( self.tree.block_size, self.tree.dtype )
  *         maxs = empty( self.tree.block_size, self.tree.dtype )
  *         sums = empty( self.tree.block_size, self.tree.dtype )             # <<<<<<<<<<<<<<
  *         sumsquares = empty( self.tree.block_size, self.tree.dtype )
  *         for i in range( len( self.children ) ):
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); 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);
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->tree->dtype);
   __Pyx_GIVEREF(__pyx_v_self->tree->dtype);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); 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);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_v_sums = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":209
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":215
  *         maxs = empty( self.tree.block_size, self.tree.dtype )
  *         sums = empty( self.tree.block_size, self.tree.dtype )
  *         sumsquares = empty( self.tree.block_size, self.tree.dtype )             # <<<<<<<<<<<<<<
  *         for i in range( len( self.children ) ):
  *             if self.children[i]:
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_empty); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tree->block_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->tree->dtype);
   __Pyx_GIVEREF(__pyx_v_self->tree->dtype);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_v_sumsquares = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":210
+  /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":216
  *         sums = empty( self.tree.block_size, self.tree.dtype )
  *         sumsquares = empty( self.tree.block_size, self.tree.dtype )
  *         for i in range( len( self.children ) ):             # <<<<<<<<<<<<<<
  *             if self.children[i]:
  *                 if self.level == 1:
  */
-  __pyx_t_4 = PyObject_Length(__pyx_v_self->children); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Length(__pyx_v_self->children); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
     __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
   } else {
-    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     } else {
       __pyx_t_1 = PyIter_Next(__pyx_t_2);
       if (!__pyx_t_1) {
-        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
       }
       __Pyx_GOTREF(__pyx_t_1);
     __pyx_v_i = __pyx_t_1;
     __pyx_t_1 = 0;
 
-    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":211
+    /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":217
  *         sumsquares = empty( self.tree.block_size, self.tree.dtype )
  *         for i in range( len( self.children ) ):
  *             if self.children[i]:             # <<<<<<<<<<<<<<
  *                 if self.level == 1:
  *                     v = self.children[i].values
  */
-    __pyx_1 = PyObject_GetItem(__pyx_v_self->children, __pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_1 = PyObject_GetItem(__pyx_v_self->children, __pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_1);
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
     if (__pyx_t_5) {
 
-      /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":212
+      /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":218
  *         for i in range( len( self.children ) ):
  *             if self.children[i]:
  *                 if self.level == 1:             # <<<<<<<<<<<<<<
       __pyx_t_5 = (__pyx_v_self->level == 1);
       if (__pyx_t_5) {
 
-        /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":213
+        /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":219
  *             if self.children[i]:
  *                 if self.level == 1:
  *                     v = self.children[i].values             # <<<<<<<<<<<<<<
  *                     counts[i] = sum( ~isnan( v ) )
  *                     mins[i] = nanmin( v )
  */
-        __pyx_1 = PyObject_GetItem(__pyx_v_self->children, __pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_1 = PyObject_GetItem(__pyx_v_self->children, __pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_1);
-        __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_1);
         __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
         __Pyx_DECREF(__pyx_v_v);
         __pyx_v_v = __pyx_t_1;
         __pyx_t_1 = 0;
 
-        /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":214
+        /* "/Users/james/projects/bx-python/code/bx-python-central/lib/bx/arrays/array_tree.pyx":220
  *                 if self.level == 1:
  *                     v = self.children[i].values
  *                     counts[i] = sum( ~isnan( v ) )             # <<<<<<<<<<<<<<
  *                     mins[i] = nanmin( v )
  *                     maxs[i] = nanmax( v )
  */
-        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_isnan); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_1 = __Pyx_GetName(__pyx