Skip to content

2.21.0

Compare
Choose a tag to compare
@lbergelson lbergelson released this 06 Nov 20:20
· 144 commits to master since this release
2.21.0
03e9a32

This is a minor release which includes new features and bug fixes:

Compatibility Notes:

This release makes several breaking changes. The changes are in lightly used APIs and shouldn't cause problems for most users. We believe it will be easy to adapt

The changes were necessary to remove outdated and unnecessary reflection code which was causing problems in java 11.

The following public methods/field were removed and their functionality has been replaced by the listed methods:

  • IndexFactory.IndexType.getIndexCreator() and IndexFactory.IndexType.getIndexType() is replaced with IndexFactory.IndexType.createIndex(BufferedInputStream)
  • ParsingUtils.registerHelperClass(Class helperClass) and ParsingUtils.urlHelperClass is replaced with setURLHelperFactory(URLHelperFactory)

New Features:

Merging Sharded Indexes:

There is new support for directly merging indexes of sharded bam/cram/vcf files. This allows tools which process parts of a large file in parallel to write their output in shards, and include an index for each shard. These indexes can then be cheaply merged when combining the shards of the file into a single large file in order to create a global index without re-indexing the entire file.

This was developed as part of disq for use with spark but is likely to be useful for any pipeline which process bam/cram/ or vcf in parallel and then needs to combine the results. The given implementation is designed to work with the sharding/naming patterns that disq uses, but can likely be extended to work with other sharding/naming schemes. Htsjdk does not currently provide a simple mechanism for writing files in the sharded format but we would like to support this in future releases. See BAMMergerTest for an example of the sharding scheme which is supported by the provided IndexMergers.

IndexFactory Path Support:

Index factory now supports Path inputs in addition to Files.

Complete Change List:

03e9a32 Add back a method which was accidentally replaced (#1433)
a83f2b3 Path-enable IndexFactory. (#1430)
c21055b Fixes indexing for codecs that implement getPathToDataFile (#1429)
f70befd Replace IndexFactory reflection. (#1431)
3f8ba35 Support for Index merging (#1263)
c33b695 Add a URLHelper factory API to ParsingUtils (#1421)
4d73aff Make VCFHeader not throw exception if contig header lines lack length field (#1418)
e357c42 Add a method to conditionally apply a Consumer on a nullable input (#1419)
e1bbd34 Fixing bad behavior in IOUtil.deletePaths (#1416)