Skip to content

Commit

Permalink
Upgrade to htsjdk 2.19.0 (#77)
Browse files Browse the repository at this point in the history
* The changes to CRAM have introduced an incompatible change to CRAIEntry that
affects CramSource in Disq. See the note about incompatible CRAM changes
at https://github.com/samtools/htsjdk/releases/tag/2.17.0.

This commit uses the new CRAIEntry API introduced in samtools/htsjdk#1256

* Convert catch for EOFException -> RuntimeEOFException

* Use htsjdk 2.19.0
  • Loading branch information
tomwhite authored Mar 14, 2019
1 parent a17266d commit 66b00a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<htsjdk.version>2.18.2</htsjdk.version>
<htsjdk.version>2.19.0</htsjdk.version>
<hadoop.version>2.7.5</hadoop.version>
<mockito.version>2.22.0</mockito.version>
<kryo-serializers.version>0.42</kryo-serializers.version>
Expand Down
4 changes: 1 addition & 3 deletions src/htsjdk/java/htsjdk/samtools/BAMIndexer2.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ public int getEnd() {

@Override
public Integer getIndexingBin() {
final Integer binNumber = rec.getIndexingBin();
return (binNumber == null ? rec.computeIndexingBin() : binNumber);

return rec.computeIndexingBin();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private NavigableSet<Long> getContainerOffsetsFromIndex(
NavigableSet<Long> containerOffsets = new TreeSet<>();
CRAIIndex index = CRAMCRAIIndexer.readIndex(in);
for (CRAIEntry entry : index.getCRAIEntries()) {
containerOffsets.add(entry.containerStartOffset);
containerOffsets.add(entry.getContainerStartByteOffset());
}
containerOffsets.add(cramFileLength);
return containerOffsets;
Expand Down

0 comments on commit 66b00a6

Please sign in to comment.