from bx.intervals.intersection import Interval, IntervalTree
tree = IntervalTree()
tree.insert(5, 7, 'foo')
tree.insert(9, 12, 'bar')
tree.find(6, 8)
['foo']
tree.before(14)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-11-3370fddbaf8e> in <module>() ----> 1 tree.before(14) /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalTree.before (lib/bx/intervals/intersection.c:4529)() /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalNode.left (lib/bx/intervals/intersection.c:2732)() AttributeError: 'str' object has no attribute 'end'
tree.before_interval(Interval(14, 16))
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-12-ddc5a057c3db> in <module>() ----> 1 tree.before_interval(Interval(14, 16)) /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalTree.before_interval (lib/bx/intervals/intersection.c:4877)() /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalNode.left (lib/bx/intervals/intersection.c:2732)() AttributeError: 'str' object has no attribute 'end'
tree.after(4)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-7-896a39c1ddb7> in <module>() ----> 1 tree.after(4) /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalTree.after (lib/bx/intervals/intersection.c:4668)() /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalNode.right (lib/bx/intervals/intersection.c:3020)() AttributeError: 'str' object has no attribute 'start'
tree.after_interval(Interval(2, 4))
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-10-abd657fa9fc5> in <module>() ----> 1 tree.after_interval(Interval(2, 4)) /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalTree.after_interval (lib/bx/intervals/intersection.c:5021)() /home/aliman/pyenv/scientific/local/lib/python2.7/site-packages/bx/intervals/intersection.so in bx.intervals.intersection.IntervalNode.right (lib/bx/intervals/intersection.c:3020)() AttributeError: 'str' object has no attribute 'start'