samtools / htsjdk

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

SamSequenceRecord implements Locatable #1459

Closed lindenb closed 4 years ago

lindenb commented 4 years ago

Description

This PR only makes the coding easier.

I often find myself testing if a Locatable overlaps a SamSequenceRecord .

interval.overlaps(new Interval(ssr.getSequenceName(),1,ssr.getSequenceLength()));

This PR adds the interface 'Locatable' to SamSequenceRecord (with start=1 && end=sequenceLength()).

interval.overlaps(ssr);

Things to think about before submitting: