samtools / htsjdk

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

add file format to index is required error message #1567

Closed yash-puligundla closed 3 years ago

yash-puligundla commented 3 years ago

Description

When index file is absent, htsjdk errors with "An index is required, but none found" message More details here

Fix

Error message specifies the expected index file format "An index is required, but none found with file ending .idx".

codecov-commenter commented 3 years ago

Codecov Report

Merging #1567 (2030bdb) into master (c647764) will decrease coverage by 0.003%. The diff coverage is 50.000%.

@@               Coverage Diff               @@
##              master     #1567       +/-   ##
===============================================
- Coverage     69.841%   69.839%   -0.003%     
- Complexity      9633      9637        +4     
===============================================
  Files            702       702               
  Lines          37611     37611               
  Branches        6108      6107        -1     
===============================================
- Hits           26268     26267        -1     
  Misses          8897      8897               
- Partials        2446      2447        +1     
Impacted Files Coverage Δ
...va/htsjdk/tribble/TribbleIndexedFeatureReader.java 74.346% <50.000%> (ø)
src/main/java/htsjdk/io/AsyncWriterPool.java 72.222% <0.000%> (-1.389%) :arrow_down:
yash-puligundla commented 3 years ago

@lbergelson I believe I should have used the constant "TRIBBLE_INDEX" instead of hard coding ".idx" to the message. Let me know if I should do that.