Home

Awesome

Build and Test Maven Central License Language Join the chat at https://gitter.im/samtools/htsjdk

A Java API for high-throughput sequencing data (HTS) formats.

HTSJDK is an implementation of a unified Java library for accessing common file formats, such as SAM and VCF, used for high-throughput sequencing data. There are also a number of useful utilities for manipulating HTS data.

NOTE: HTSJDK has only partial support for the latest Variant Call Format Specification. VCFv4.3 can be read but not written and there is no support for BCFv2.2

Documentation & Getting Help

API documentation for all versions of HTSJDK since 1.128 are available through javadoc.io.

If you believe you have found a bug or have an issue with the library please a) search the open and recently closed issues to ensure it has not already been reported, then b) log an issue.

The project has a gitter chat room if you would like to chat with the developers and others involved in the project.

To receive announcements of releases and other significant project news please subscribe to the htsjdk-announce google group.

Building HTSJDK

HTSJDK is built using gradle.

A wrapper script (gradlew) is included which will download the appropriate version of gradle on the first invocation.

Example gradle usage from the htsjdk root directory:

./gradlew

or

./gradlew jar

The jar will be in build/libs/htsjdk-<version>.jar where version is based on the current git commit.

./gradlew test

./gradlew test --tests AlleleUnitTest

./gradlew test --tests AlleleUnitTest --debug-jvm
./gradlew jacocoTestReport
./gradlew clean
./gradlew shadowJar
./gradlew install
./gradlew tasks

Create an HTSJDK project in IntelliJ

To create a project in IntelliJ IDE for htsjdk do the following:

  1. Select from the menu: File -> New -> Project from Existing Sources
  2. In the resulting dialog, chose Import from existing model, select Gradle and Next
  3. Choose the default gradle wrapper and Finish.

From time to time if dependencies change in htsjdk you may need to refresh the project from the View -> Gradle menu.

Code style

Style guides files are included for Intellij and Eclipse. These are a variation of the Google Java Style with 4 space indentation. This style is suggested for new code but not rigidly checked. We allow for contributors to deviate from the style when it improves clarity or to match surrounding code. Existing code does not necessarily conform to this and does not need to be modified to do so, but users are encouraged to correct the formatting of code that they modify.

Licensing Information

Not all sub-packages of htsjdk are subject to the same license, so a license notice is included in each source file or sub-package as appropriate. Please check the relevant license notice whenever you start working with a part of htsjdk that you have not previously worked with to avoid any surprises. Broadly speaking the majority of the code is covered under the MIT license with the following notable exceptions:

Java Minimum Version Support Policy

Htsjdk currently targets Java 8 and is tested on both 8 and 11.

We intend to drop support for 8/11 and switch exclusively to 17+ in our next release (4.0.0).

Given our promise of 6 months of warning before a move off of 8, we will atttempt to provide 3.x releases on demand if any critical bugs are discovered in the next 6 months.

Java SE Major ReleaseEnd of Java SE Oracle Public Updates / OpenJDK supportProposed End of Support in HTSJDKActual End of Support in HTSJDK
6Feb 2013Aug 2013Oct 2015
7Apr 2015Oct 2015Oct 2015
8Jan 2019Feb 2022TBD
11Sep 2022Feb 2022TBD
17TBDTBDTBD

Meaning of the Htsjdk version number

We encourage downstream projects to use the most recent htsjdk release in order to have access to the most up to date features and bug fixes. It is therefore important therefore to make upgrading to newer versions as easy as possible. We make a best effort to adhere to the following principles in order to minimize disruption to projects that depend on htsjdk:

We treat any accessible class/method/field as part of our API and attempt to minimize changes to it with the following exceptions:

Our current version number has 3 parts. ex: 2.19.0