samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

Adding tests revealing 0-length interval nonsense #1320

Open lbergelson opened 5 years ago

lbergelson commented 5 years ago

This PR adds failing tests that test intersection/abutment using 0-length intervals.

Many are failing...

I've added an ascii diagram in the test to show my belief of what the various intervals represent.

The equivalent methods in Interval and Locatable have slightly different failure modes.

We should decide what the right answer is, and then fix the various methods to implement those.

We should also check related methods like encloses and overlap in CoordMath.

I'm sick of this issue and want it to be resolved so we never have to think about it again.