Skip to content
forked from samtools/htslib

C library for high-throughput sequencing data formats

License

Notifications You must be signed in to change notification settings

jkbonfield/htslib

This branch is 2 commits ahead of, 27 commits behind samtools/htslib:develop.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1fe6f9d · Oct 9, 2024
Aug 29, 2024
Oct 9, 2024
Aug 29, 2024
Sep 12, 2024
Nov 13, 2023
Nov 4, 2019
Aug 27, 2024
Oct 9, 2024
Aug 29, 2024
Jul 4, 2024
Jul 18, 2024
Jan 11, 2021
Apr 12, 2024
Jan 18, 2024
Sep 24, 2024
Sep 12, 2024
Apr 12, 2021
Dec 13, 2019
Sep 9, 2024
Sep 12, 2024
Jul 30, 2024
Aug 17, 2021
Sep 26, 2019
Apr 5, 2024
Sep 12, 2024
Aug 29, 2024
May 11, 2021
Nov 24, 2023
Sep 24, 2024
Nov 19, 2019
Jun 20, 2018
Aug 15, 2024
Aug 25, 2023
Apr 29, 2024
Jan 8, 2020
Aug 16, 2024
Jun 24, 2021
May 25, 2022
Apr 29, 2024
Apr 5, 2024
Apr 29, 2024
Aug 29, 2024
Aug 15, 2024
Sep 23, 2024
Feb 3, 2021
Aug 15, 2024
Jul 19, 2022
Mar 31, 2023
Mar 3, 2021
Sep 12, 2024
Aug 19, 2024
Sep 12, 2024
Sep 12, 2024
Oct 13, 2023
Feb 17, 2017
Aug 16, 2022
Feb 3, 2021
Apr 5, 2024
Nov 5, 2019
Nov 19, 2019
Mar 30, 2023
Jul 20, 2023
May 23, 2023
Oct 13, 2023
Nov 5, 2019
Sep 16, 2020
Sep 27, 2024
Aug 15, 2024
Apr 5, 2024
Sep 24, 2024
Jun 20, 2024
Sep 12, 2024
Mar 26, 2024
May 23, 2024
Apr 29, 2024
Apr 5, 2024
Jul 29, 2021
Mar 6, 2019
Nov 19, 2019
Sep 12, 2024
Aug 24, 2020
Feb 10, 2022
Sep 12, 2024

Repository files navigation

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 creates 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:

autoreconf -i  # Build the configure script and install files it uses
./configure    # Optional but recommended, for choosing extra functionality
make
make install

Citing

Please cite this paper when using HTSlib for your publications.

HTSlib: C library for reading/writing high-throughput sequencing data
James K Bonfield, John Marshall, Petr Danecek, Heng Li, Valeriu Ohan, Andrew Whitwham, Thomas Keane, Robert M Davies
GigaScience, Volume 10, Issue 2, February 2021, giab007, https://doi.org/10.1093/gigascience/giab007

@article{10.1093/gigascience/giab007,
    author = {Bonfield, James K and Marshall, John and Danecek, Petr and Li, Heng and Ohan, Valeriu and Whitwham, Andrew and Keane, Thomas and Davies, Robert M},
    title = "{HTSlib: C library for reading/writing high-throughput sequencing data}",
    journal = {GigaScience},
    volume = {10},
    number = {2},
    year = {2021},
    month = {02},
    abstract = "{Since the original publication of the VCF and SAM formats, an explosion of software tools have been created to process these data files. To facilitate this a library was produced out of the original SAMtools implementation, with a focus on performance and robustness. The file formats themselves have become international standards under the jurisdiction of the Global Alliance for Genomics and Health.We present a software library for providing programmatic access to sequencing alignment and variant formats. It was born out of the widely used SAMtools and BCFtools applications. Considerable improvements have been made to the original code plus many new features including newer access protocols, the addition of the CRAM file format, better indexing and iterators, and better use of threading.Since the original Samtools release, performance has been considerably improved, with a BAM read-write loop running 5 times faster and BAM to SAM conversion 13 times faster (both using 16 threads, compared to Samtools 0.1.19). Widespread adoption has seen HTSlib downloaded \\>1 million times from GitHub and conda. The C library has been used directly by an estimated 900 GitHub projects and has been incorporated into Perl, Python, Rust, and R, significantly expanding the number of uses via other languages. HTSlib is open source and is freely available from htslib.org under MIT/BSD license.}",
    issn = {2047-217X},
    doi = {10.1093/gigascience/giab007},
    url = {https://doi.org/10.1093/gigascience/giab007},
    note = {giab007},
    eprint = {https://academic.oup.com/gigascience/article-pdf/10/2/giab007/36332285/giab007.pdf},
}

About

C library for high-throughput sequencing data formats

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 91.0%
  • Perl 2.8%
  • Makefile 1.9%
  • M4 1.4%
  • Roff 1.4%
  • Shell 0.8%
  • Other 0.7%