Latest release

2.16.0

@lbergelson lbergelson released this Jun 19, 2018 · 7 commits to master since this release

This release includes significant new features and bug fixes. It is not technically backwards compatible with 2.15 releases, but most downstream users should not encounter major difficulties when updating.

New Features:

Block compressed indexed FASTA files:

Htsjdk can now read block compressed (.bgz / .gz) fasta files if they have a .gzi and a .fai index. No more need to unzip the reference before reading it!
Load reference files with ReferenceSequenceFileFactory.getReferenceSequenceFile() and it will automatically discover the correct indexes.

A gzi index can be generated with GZIIndex.createIndex() and related methods. Alternatively it can be created with the bgzip program. Note that gzip and bgzip are different formats and gzipped files cannot be index with a gzi. The fai index is used alongside the .gzi for random access to fasta and is unchanged for zipped vs unzipped files.

People directly instantiating the concrete ReferenceSequenceFile classes may want to move to using the factory in order to get access to this feature.
b2bfb32 Support for block-compressed indexed FASTA references (#1014)
c19f9f7 removing new finals in AbstractIndexedFastaSequenceFile (#1135)
#996, #864

SamLocusAndBaseIterator:

New iterator which traverses a bam file and reference together and returns pileup information along with the associated reference bases.
336fa5c Yf sam locus and reference base iterator (#1137)

Expanded support for non File inputs

Added new methods to allow using Path in more places.
ccc9259 Fix reading a CRAM with an index from a non-File Path. (#1125)
3a20218 Add SAMFileWriterFactory methods that take referenceFile as a Path(#1005)
96ce8fb deprecating overloads makeCRAMWriter with mixed Path/File (#1150)

Added additional methods to read/write directly from Streams in cases where a Path or File is not available.
72818a0 Allow ReferenceSequenceFileFactory to load from streams (#1123)
34dbda7 Make BAMFileWriter public to expose code to write a BAM header to a stream. (#1119)
71c5a69 Add method to load tribble index from a stream. (#1145)

Restore SRA support

Support for reading SRA was broken because of changes in the SRA API. A new version of their Java API adapter has been published and is now integrated into htsjdk. Support should be restored.
0aff433 restoring SRA support by updating the backing library (#1142)

Methods moved to IOUtils

Several methods for identifying if a file is block compressed moved to IOUtils. The original methods have been deprecated.
85d2b8d Add utilities for checking block-compressed files in IOUtils #1130 (#1132)
55debe2 adding test for IOUtil.isBlockCompressed (#1141)

Other improvements and bugfixes

9ea0a03 new method CRAMFileReader.createIndexIterator (#1120)
8b55de6 Add new class VCFHeaderReader #1122 (#1148)
52ec082 making public static fields in SamReader.Type final (#1146)
5eb8ee3 Make SamReader.Type methods public (#1144)
efefdd0 update FastqRecord.toString javadoc to warn users of future behavior change (#952)
0d8e1c6 Fixed bug where GL field overrides PL field #1097 (#1098)
497a0f3 made VariantContextWriterBuilder.determineOutputTypeFromFile public (#1066)
f007ed3 Add an optimized version of CramContainerIterator (#1129)
d3d7a6e SAMFileWriterImpl extensibility improvements (#913)
442029c seeking within SeekableBufferedStream's buffer reuses the existing buffer (#1121)