chaimleib / intervaltree

A mutable, self-balancing interval tree. Queries may be by point, by range overlap, or by range containment.
Apache License 2.0
636 stars 108 forks source link

ValueError: IntervalTree: Null Interval objects not allowed in IntervalTree #136

Open robertwhbaldwin opened 9 months ago

robertwhbaldwin commented 9 months ago

a list of tuples: [(1234, 4)]

def calc_aln_length( aln_intervals: list[tuple] ) -> int: itree = IntervalTree.from_tuples(aln_intervals)

produces this error: ValueError: IntervalTree: Null Interval objects not allowed in IntervalTree: Interval(1234, 4)

What is the problem ? This is not the expected behavior

robertwhbaldwin commented 9 months ago

nevermind it turns out that the begin and end coords were mixed up as you can see it should have been [(2, 1234)]