Repository navigation
5.0.1
htsjdk 5.0.1 Release Notes
A patch release on the 5.0 line that makes BCF decoding and many-sample VCF writing much faster. It is a drop-in replacement for 5.0.0: there is no API change, and decoded values and written output are byte-for-byte unchanged.
⚡ Performance
- BCF records decode faster, most of all their genotypes.
BCF2Decoderreads each value straight from the record's bytes rather than a byte at a time through a synchronizedByteArrayInputStream. Reading a 3,000-sample BCF and decoding every genotype takes 40–60% less time on Apple silicon (#1856). - Writing VCF records with many samples is faster.
VCFEncoder.formatVCFDoubleformats%.2fand%.3fvalues without ajava.util.Formatterexcept near a rounding halfway point. List and array attributes are formatted without reflection.VCFWriterencodes each record into aStringBuilderand writes it in one call, rather than taking theBufferedWriter's lock for every few characters (#1857). - The VCF encoder does less for each sample. It works out each FORMAT key's kind once per record, writes a missing attribute without formatting it, takes genotypes by position when a record's genotypes are in the header's sample order, and finds a GT allele's code by identity before hashing its bases (#1858).
🐛 Bug fixes
- A truncated or corrupt BCF record now fails with a
TribbleExceptionwhen decoding reaches the end of the record's bytes. It used to read each missing byte as0xFF(so a value came out as-1) and carry on (#1856). - A VCF record that fails to encode no longer corrupts the next one.
VCFWriterused to leave the columns it had written before the failure at the start of the next record's line (#1857).
📥 How to upgrade
Change the version from 5.0.0 to 5.0.1. Nothing else is needed.
Full Changelog: 5.0.0...5.0.1