Skip to content
Snippets Groups Projects
Select Git revision
  • 1c4acb412b8020b0ed407c80230195277f90703d
  • develop default protected
  • master
  • hts_opt_block_size
  • bz2-lzma-pkgconfig
  • exp/raw-index
  • cram_split_tags
  • configure
  • feature/contig_comma
  • parser-flags
  • irods_update
  • cigar-P-bis
  • cram_digests
  • CSIv2
  • ftype
  • lite
  • norm-indels
  • 1.8
  • 1.7
  • 1.6
  • 1.5
  • 1.4.1
  • 1.4
  • 1.3.2
  • 1.3.1
  • 1.3
  • 1.2.1
  • 1.2
  • 1.1
  • 1.0
  • 0.2.0-rc12
  • 0.2.0-rc11
  • 0.2.0-rc10
  • 0.2.0-rc9
  • 0.2.0-rc8
  • 0.2.0-rc7
  • 0.2.0-rc6
37 results

htslib

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    James Bonfield authored and Rob Davies committed
    These were spotted by gcc -fsanitize=thread.
    
    1. Decoding: fd->no_ref is set while decoding the compression header
    and used in subsequent slice decodes, but we may then decode the next
    container compression header before the previous slices have finished
    decoding.
    
    2. Decoding: avoid race when limiting data via required_fields.
    
    fd->decode_md is now copied to s->decode_md, so the slice can disable
    this itself if required (such as when the user asked for MD tag to be
    filled out while also asking not to return any auxiliary blocks).
    
    Although technically fixing a threading violation, the practical
    implementations means this is just a tidyup rather than any real
    behavior changes.
    
    3. Encoding: Cram_encode_aux needed an extra guard surrounding the
    fd->tags_used field.  This is used to hold tag types seen so far in
    the file, within any container or block, so we can keep track of the
    compression methods that work best for a any specific tag type.
    1c4acb41
    History

    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, needed for choosing optional functionality
    make
    make install