samtools / htsjdk

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

Fixed a bug in the locus accumulator where the accumulator didn't add… #1489

Closed yfarjoun closed 4 years ago

yfarjoun commented 4 years ago

… the right locusInfos, causing a rare and strange bug in picard https://github.com/broadinstitute/picard/issues/1523

This bug was introduced by c5ed6b74b292 since it enabled some locus-infos to remain in the array one position prior to the current read. This is needed since the insertions are placed there. Specifically, the changes in AbstractLocusIterator cerca lines 286 change the point at which the while loop stops, populateCompleteQueue also removed the first element from the collector, so fewer elements are removed....

The added test fails without this change.

codecov-commenter commented 4 years ago

Codecov Report

Merging #1489 into master will increase coverage by 0.016%. The diff coverage is 80.000%.

@@               Coverage Diff               @@
##              master     #1489       +/-   ##
===============================================
+ Coverage     69.235%   69.251%   +0.016%     
- Complexity      8721      8725        +4     
===============================================
  Files            588       588               
  Lines          34620     34622        +2     
  Branches        5787      5789        +2     
===============================================
+ Hits           23969     23976        +7     
+ Misses          8367      8364        -3     
+ Partials        2284      2282        -2     
Impacted Files Coverage Δ Complexity Δ
...in/java/htsjdk/samtools/util/EdgeReadIterator.java 77.358% <80.000%> (-3.034%) 17.000 <0.000> (+1.000) :arrow_down:
...samtools/util/AsyncBlockCompressedInputStream.java 76.000% <0.000%> (+4.000%) 13.000% <0.000%> (+1.000%)
...htsjdk/samtools/util/nio/DeleteOnExitPathHook.java 90.476% <0.000%> (+9.524%) 4.000% <0.000%> (+1.000%)
...n/java/htsjdk/samtools/filter/AggregateFilter.java 61.538% <0.000%> (+15.385%) 4.000% <0.000%> (+1.000%)