C library for high-throughput sequencing data formats
Clone or download
Permalink
Failed to load latest commit information.
cram Change CRAM ptell function to work with a consumer file offset. Oct 17, 2018
htslib Add documentation to sam_read1 and sam_write1 functions. Oct 17, 2018
m4 Add tcc warnings/werror and fix misplaced bracket Dec 24, 2017
os Add os/lzma_stub.h header containing basic liblzma declarations Dec 6, 2017
test Merge Sam reading and writing speed improvements (PR #722) Sep 13, 2018
.appveyor.yml Added -Werror to travis and appveyor config. Aug 2, 2018
.gitattributes Prevent export of .appveyor.yml [minor] Mar 29, 2018
.gitignore Add test/test_kstring Sep 10, 2018
.travis.yml On travis, add gcc-8 tests, remove MacOS gcc and try to tidy matrix Oct 16, 2018
INSTALL Additional installation hints for dependencies. Jul 13, 2018
LICENSE Update dates in LICENSE file Jul 4, 2018
Makefile Merge Add kbs_resize() (PR #710) [breaks ABI] Sep 14, 2018
NEWS News update for ABI bump. Sep 14, 2018
README Add basic INSTALL and README files Aug 15, 2014
README.md Add the official repo token. Oct 1, 2018
aclocal.m4 Add aclocal.m4 with pkg-config macros. Jul 27, 2018
bcf_sr_sort.c Use kbs_resize() from htslib/kbitset.h in bcf_sr_sort.c Sep 13, 2018
bcf_sr_sort.h Update internal state on synced reader's seek Apr 24, 2018
bgzf.c BGZF CRC checking on decode now also applies when threaded. Aug 2, 2018
bgzip.1 Release 1.9 Jul 18, 2018
bgzip.c Make bgzip --help and tabix --help write to standard output Aug 6, 2018
config.mk.in Move S3 support from hfile_libcurl.c to hfile_s3.c Jan 13, 2017
configure.ac Remove trailing whitespace Jun 28, 2018
errmod.c Calculate sum in logarithmic form Nov 10, 2017
faidx.5 FASTQ information added. Jun 20, 2018
faidx.c Rephrase error message in `faidx_adjust_position` Aug 15, 2018
hfile.c MSYS environment works with Windows style paths, although it Oct 12, 2018
hfile_gcs.c Add support for Google Cloud Storage pseudo-URLs Dec 15, 2016
hfile_internal.h Accomodate use of some internal APIs in plug-ins Jan 17, 2018
hfile_libcurl.c Fix the build on MSYS environments, which don't include Oct 12, 2018
hfile_net.c Add hFILE plugin interface and pluginise irods/libcurl backends Oct 28, 2015
hfile_s3.c Accomodate use of some internal APIs in plug-ins Jan 17, 2018
hts.c Change CRAM ptell function to work with a consumer file offset. Oct 17, 2018
hts_internal.h Accomodate use of some internal APIs in plug-ins Jan 17, 2018
hts_os.c Make hts_os.c's HAVE_DRAND48 check actually work Dec 6, 2017
htsfile.1 Add htsfile --copy option that does byte-for-byte file copies Aug 10, 2018
htsfile.c [minor] Ensure unknown options result in errors Aug 10, 2018
htslib.mk Update dependencies and htslib*.mk variables Jul 4, 2018
htslib.pc.in Deal with bzip2 pkg-config module not being available everywhere Feb 17, 2017
htslib_vars.mk Update dependencies and htslib*.mk variables Jul 4, 2018
kfunc.c Add AC_SYS_LARGEFILE test so 32-bit systems can access 2GiB+ files Jan 27, 2016
knetfile.c Fix memory leak in knetfile.c Aug 13, 2018
kstring.c Further SAM parsing speed tweak. Sep 10, 2018
md5.c Fix undefined behaviour and improve endian-related behaviour Jan 25, 2017
multipart.c Simplify tracking of where the Authorization header is Oct 11, 2017
plugin.c Allow plugins to select RTLD_LOCAL or RTLD_GLOBAL Jul 28, 2016
probaln.c Stop probaln_glocal from allocating too much memory. Feb 5, 2018
realn.c sam_prob_realn: Rename obscure variables and add documentation Feb 8, 2018
regidx.c Remove trailing whitespace and tabs Sep 27, 2017
sam.5 Add copyright notices and licensing boilerplate Jul 30, 2014
sam.c Change CRAM ptell function to work with a consumer file offset. Oct 17, 2018
synced_bcf_reader.c Fix gcc 8.1 warnings May 18, 2018
tabix.1 Release 1.9 Jul 18, 2018
tabix.c Fix the end coordinate passed to the regidx_overlap function, Aug 14, 2018
tbx.c Fix tbx_readrec error checking. Aug 2, 2018
textutils.c Accomodate use of some internal APIs in plug-ins Jan 17, 2018
textutils_internal.h Accomodate use of some internal APIs in plug-ins Jan 17, 2018
thread_pool.c Tidy up thread pool mutex locking Jul 27, 2018
thread_pool_internal.h Don't redefine thread_pool.h typedefs Oct 11, 2016
vcf.5 Add copyright notices and licensing boilerplate Jul 30, 2014
vcf.c Use the new macros internally. Sep 28, 2018
vcf_sweep.c Remove htsFile's use of kstream Dec 2, 2016
vcfutils.c Fix SunStudio compiler warnings Mar 15, 2018
version.sh Release 1.9 Jul 18, 2018

README.md

Build Status Build status Github All Releases

HTSlib is an implementation of a unified C library for accessing common file formats, such as SAM, CRAM and VCF, used for high-throughput sequencing data, and is the core library used by samtools and bcftools. HTSlib only depends on zlib. It is known to be compatible with gcc, g++ and clang.

HTSlib implements a generalized BAM index, with file extension .csi (coordinate-sorted index). The HTSlib file reader first looks for the new index and then for the old if the new index is absent.

This project also includes the popular tabix indexer, which indexes both .tbi and .csi formats, and the bgzip compression utility.

Building HTSlib

See INSTALL for complete details. Release tarballs contain generated files that have not been committed to this repository, so building the code from a Git repository requires extra steps:

autoheader     # If using configure, generate the header template...
autoconf       # ...and configure script (or use autoreconf to do both)
./configure    # Optional but recommended, for choosing extra functionality
make
make install