samtools / htsjdk

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

Optimize AbstractBAMFileIndex#query with test #1397

Closed lbergelson closed 5 years ago

lbergelson commented 5 years ago

Description

Adding a test to https://github.com/samtools/htsjdk/pull/1396

Things to think about before submitting:

lbergelson commented 5 years ago

@tomwhite I've added a test ontop of your branch. I couldn't push directly to yours so I've just opened a different Pr.

codecov-io commented 5 years ago

Codecov Report

Merging #1397 into master will increase coverage by 0.716%. The diff coverage is 100%.

@@               Coverage Diff               @@
##              master     #1397       +/-   ##
===============================================
+ Coverage     68.046%   68.761%   +0.716%     
- Complexity      8370      9116      +746     
===============================================
  Files            573       573               
  Lines          33886     36026     +2140     
  Branches        5662      6256      +594     
===============================================
+ Hits           23058     24772     +1714     
- Misses          8640      8978      +338     
- Partials        2188      2276       +88
Impacted Files Coverage Δ Complexity Δ
src/main/java/htsjdk/samtools/CSIIndex.java 71.622% <ø> (ø) 59 <0> (ø) :arrow_down:
...ain/java/htsjdk/samtools/AbstractBAMFileIndex.java 85.207% <100%> (+0.451%) 50 <0> (+2) :arrow_up:
...htsjdk/samtools/util/nio/DeleteOnExitPathHook.java 78.947% <0%> (-10.526%) 3% <0%> (-1%)
.../main/java/htsjdk/samtools/SAMValidationError.java 93.805% <0%> (-2.349%) 11% <0%> (+2%)
src/main/java/htsjdk/samtools/BAMSBIIndexer.java 73.333% <0%> (-1.667%) 1% <0%> (ø)
src/main/java/htsjdk/tribble/Tribble.java 100% <0%> (ø) 16% <0%> (+8%) :arrow_up:
src/main/java/htsjdk/tribble/util/TabixUtils.java 0% <0%> (ø) 0% <0%> (ø) :arrow_down:
...c/main/java/htsjdk/samtools/util/IntervalList.java 72.311% <0%> (+0.131%) 105% <0%> (+41%) :arrow_up:
src/main/java/htsjdk/samtools/SamFiles.java 92.857% <0%> (+0.174%) 30% <0%> (+15%) :arrow_up:
src/main/java/htsjdk/samtools/BAMFileReader.java 69.003% <0%> (+0.537%) 52% <0%> (ø) :arrow_down:
... and 27 more
tomwhite commented 5 years ago

Thanks for adding a test @lbergelson