Instead of using bisect search of a fragment position list, using intervaltree to search for fragments overlapped by a mapping. This has the added benefit of (anecdotally) reporting the pct overlap, should that be used in future mapping methods to determine which fragment to report. The downside is that for multi-fragment mappings (i.e. where start and stop don't map to the same fragment), there's about a (1/e)% time cost because searching the start can't be used to pare down the remaining search space.
given a (start,stop) identify the fragments.
binomial search for start in a fragment list L.
this enables binomial search for stop in L[start:], which speeds up the search by 1/e, iirc.
Instead of using bisect search of a fragment position list, using intervaltree to search for fragments overlapped by a mapping. This has the added benefit of (anecdotally) reporting the pct overlap, should that be used in future mapping methods to determine which fragment to report. The downside is that for multi-fragment mappings (i.e. where start and stop don't map to the same fragment), there's about a (1/e)% time cost because searching the start can't be used to pare down the remaining search space.