samtools / htsjdk

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

SamIndexes methods present CSIs as BAIs #1425

Open cmnbroad opened 5 years ago

cmnbroad commented 5 years ago

All of the public methods in SamIndexes have names that indicate that they return BAI streams ("openIndexFileAsBaiOrNull...", etc), which they do by either opening a BAI file directly, or opening a CRAI and converting it to BAI. For some reason when we added CSI, these code paths were updated to detect and return CSI streams as raw CSI, with no conversion, but these are not BAI streams. We should make the name of the class, and the names and behaviors of the methods somehow all mutually consistent.