1. James Taylor
  2. bx-python
Issue #9 resolved

ClusterTree does not condense overlapping intervals in edge case

Brad Chapman
created an issue

Starting with a list of start end coordinates like:

pairs = [(3, 4), (6, 7), (9, 10), (1, 2), (3, 8)]

Cluster tree should produce three output clusters:

1 2 [0]

3 8 [1, 2, 3]

9 10 [4]

Instead, the initial (3, 4) start end interval is not overlapped with the later (3, 8) interval:

1 2 [3]

3 4 [0]

3 8 [1, 4]

9 10 [2]

This appears to happen in an edge case where you have two intervals that will later be joined by a third, and intervening are larger and smaller intervals. If you remove the (9, 10) or (1, 2) pair, you do not see the problem. Similarly, if you sort the pairs, the clusters also build correctly.

Attached is a short script with which demonstrates the problem. Let me know if I can provide any other information. Thanks much.

Comments (1)

  1. Log in to comment