Loading INSTALL +44 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ Requirements ============ Building HTSlib requires a few programs and libraries to be present. See the "System Specific Details" below for guidance on how to install these. At least the following are required: GNU make Loading @@ -29,7 +32,7 @@ library itself, and include files needed to compile code that uses functions from the library. Note that some Linux distributions put include files in a development ('-dev' or '-devel') package separate from the main library. libz (required) zlib (required) libbz2 (required, unless configured with --disable-bz2) liblzma (required, unless configured with --disable-lzma) libcurl (optional, but strongly recommended) Loading Loading @@ -200,3 +203,42 @@ For example, make DESTDIR=/tmp/staging prefix=/opt would install into bin, lib, etc subdirectories under /tmp/staging/opt. System Specific Details ======================= Installing the prerequisites is system dependent and there is more than one correct way of satisfying these, including downloading them from source, compiling and installing them yourself. For people with super-user access, we provide an example set of commands below for installing the dependencies on a variety of operating system distributions. Note these are not specific recommendations on distribution, compiler or SSL implementation. It is assumed you already have the core set of packages for the given distribution - the lists may be incomplete if this is not the case. Debian / Ubuntu --------------- sudo apt-get update # Ensure the package list is up to date sudo apt-get install autoconf automake make gcc perl zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev Note: libcurl4-openssl-dev can be used as an alternative to libcurl4-gnutls-dev. RedHat / CentOS --------------- sudo yum install autoconf automake make gcc perl-Data-Dumper zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel Alpine Linux ------------ sudo apk update # Ensure the package list is up to date sudo apk add autoconf automake make gcc musl-dev perl bash zlib-dev bzip2-dev xz-dev curl-dev libressl-dev OpenSUSE -------- sudo zypper install autoconf automake make gcc perl zlib-devel libbz2-devel xz-devel libcurl-devel libopenssl-devel LICENSE +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ according to the terms of the following MIT/Expat license.] The MIT/Expat License Copyright (C) 2012-2014 Genome Research Ltd. Copyright (C) 2012-2018 Genome Research Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Loading @@ -29,7 +29,7 @@ according to the terms of the following Modified 3-Clause BSD license.] The Modified-BSD License Copyright (C) 2012-2014 Genome Research Ltd. Copyright (C) 2012-2018 Genome Research Ltd. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Loading Makefile +18 −17 Original line number Diff line number Diff line Loading @@ -174,8 +174,9 @@ cram_misc_h = cram/misc.h $(cram_os_h) cram_os_h = cram/os.h $(htslib_hts_endian_h) cram_sam_header_h = cram/sam_header.h cram/string_alloc.h cram/pooled_alloc.h $(htslib_khash_h) $(htslib_kstring_h) cram_samtools_h = cram/cram_samtools.h $(htslib_sam_h) $(cram_sam_header_h) cram_structs_h = cram/cram_structs.h $(htslib_thread_pool_h) cram/string_alloc.h $(htslib_khash_h) cram_structs_h = cram/cram_structs.h $(htslib_thread_pool_h) cram/string_alloc.h cram/mFILE.h $(htslib_khash_h) cram_open_trace_file_h = cram/open_trace_file.h cram/mFILE.h bcf_sr_sort_h = bcf_sr_sort.h $(htslib_synced_bcf_reader_h) $(htslib_kbitset_h) hfile_internal_h = hfile_internal.h $(htslib_hfile_h) $(textutils_internal_h) hts_internal_h = hts_internal.h $(htslib_hts_h) $(textutils_internal_h) textutils_internal_h = textutils_internal.h $(htslib_kstring_h) Loading Loading @@ -288,23 +289,23 @@ hts-$(LIBHTS_SOVERSION).dll: $(LIBHTS_OBJS) $(CC) -shared $(LDFLAGS) -o $@ $< hts.dll.a $(LIBS) bgzf.o bgzf.pico: bgzf.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(htslib_hfile_h) $(htslib_thread_pool_h) cram/pooled_alloc.h $(htslib_khash_h) errmod.o errmod.pico: errmod.c config.h $(htslib_hts_h) $(htslib_ksort_h) bgzf.o bgzf.pico: bgzf.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(htslib_hfile_h) $(htslib_thread_pool_h) $(htslib_hts_endian_h) cram/pooled_alloc.h $(htslib_khash_h) errmod.o errmod.pico: errmod.c config.h $(htslib_hts_h) $(htslib_ksort_h) $(htslib_hts_os_h) kstring.o kstring.pico: kstring.c config.h $(htslib_kstring_h) knetfile.o knetfile.pico: knetfile.c config.h $(htslib_hts_log_h) $(htslib_knetfile_h) hfile.o hfile.pico: hfile.c config.h $(htslib_hfile_h) $(hfile_internal_h) $(hts_internal_h) $(htslib_khash_h) hfile_gcs.o hfile_gcs.pico: hfile_gcs.c config.h $(htslib_hts_h) $(htslib_kstring_h) $(hfile_internal_h) hfile_libcurl.o hfile_libcurl.pico: hfile_libcurl.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) hfile_libcurl.o hfile_libcurl.pico: hfile_libcurl.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) $(htslib_khash_h) hfile_net.o hfile_net.pico: hfile_net.c config.h $(hfile_internal_h) $(htslib_knetfile_h) hfile_s3.o hfile_s3.pico: hfile_s3.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) hts.o hts.pico: hts.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(cram_h) $(hfile_internal_h) $(htslib_hfile_h) version.h $(hts_internal_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_ksort_h) hts.o hts.pico: hts.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(cram_h) $(htslib_hfile_h) $(htslib_hts_endian_h) version.h $(hts_internal_h) $(hfile_internal_h) $(htslib_hts_os_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_ksort_h) hts_os.o hts_os.pico: hts_os.c config.h os/rand.c vcf.o vcf.pico: vcf.c config.h $(htslib_vcf_h) $(htslib_bgzf_h) $(htslib_tbx_h) $(htslib_hfile_h) $(hts_internal_h) $(htslib_khash_str2int_h) $(htslib_kstring_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_hts_endian_h) sam.o sam.pico: sam.c config.h $(htslib_sam_h) $(htslib_bgzf_h) $(cram_h) $(hts_internal_h) $(htslib_hfile_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_kstring_h) $(htslib_hts_endian_h) tbx.o tbx.pico: tbx.c config.h $(htslib_tbx_h) $(htslib_bgzf_h) $(hts_internal_h) $(htslib_khash_h) tbx.o tbx.pico: tbx.c config.h $(htslib_tbx_h) $(htslib_bgzf_h) $(htslib_hts_endian_h) $(hts_internal_h) $(htslib_khash_h) faidx.o faidx.pico: faidx.c config.h $(htslib_bgzf_h) $(htslib_faidx_h) $(htslib_hfile_h) $(htslib_khash_h) $(htslib_kstring_h) $(hts_internal_h) bcf_sr_sort.o bcf_sr_sort.pico: bcf_sr_sort.c config.h bcf_sr_sort.h $(htslib_kseq_h) $(htslib_khash_str2int_h) synced_bcf_reader.o synced_bcf_reader.pico: synced_bcf_reader.c config.h bcf_sr_sort.h $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(htslib_bgzf_h) $(htslib_thread_pool_h) bcf_sr_sort.o bcf_sr_sort.pico: bcf_sr_sort.c config.h $(bcf_sr_sort_h) $(htslib_khash_str2int_h) synced_bcf_reader.o synced_bcf_reader.pico: synced_bcf_reader.c config.h $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(htslib_bgzf_h) $(htslib_thread_pool_h) $(bcf_sr_sort_h) vcf_sweep.o vcf_sweep.pico: vcf_sweep.c config.h $(htslib_vcf_sweep_h) $(htslib_bgzf_h) vcfutils.o vcfutils.pico: vcfutils.c config.h $(htslib_vcfutils_h) $(htslib_kbitset_h) kfunc.o kfunc.pico: kfunc.c config.h $(htslib_kfunc_h) Loading @@ -325,11 +326,11 @@ cram/cram_io.o cram/cram_io.pico: cram/cram_io.c config.h os/lzma_stub.h $(cram_ cram/cram_samtools.o cram/cram_samtools.pico: cram/cram_samtools.c config.h $(cram_h) $(htslib_sam_h) cram/cram_stats.o cram/cram_stats.pico: cram/cram_stats.c config.h $(cram_h) $(cram_os_h) cram/files.o cram/files.pico: cram/files.c config.h $(cram_misc_h) cram/mFILE.o cram/mFILE.pico: cram/mFILE.c config.h $(cram_os_h) cram/mFILE.h cram/open_trace_file.o cram/open_trace_file.pico: cram/open_trace_file.c config.h $(cram_os_h) $(cram_open_trace_file_h) $(cram_misc_h) $(htslib_hfile_h) cram/mFILE.o cram/mFILE.pico: cram/mFILE.c config.h $(htslib_hts_log_h) $(cram_os_h) cram/mFILE.h cram/open_trace_file.o cram/open_trace_file.pico: cram/open_trace_file.c config.h $(cram_os_h) $(cram_open_trace_file_h) $(cram_misc_h) $(htslib_hfile_h) $(htslib_hts_log_h) cram/pooled_alloc.o cram/pooled_alloc.pico: cram/pooled_alloc.c config.h cram/pooled_alloc.h $(cram_misc_h) cram/rANS_static.o cram/rANS_static.pico: cram/rANS_static.c config.h cram/rANS_static.h cram/rANS_byte.h cram/sam_header.o cram/sam_header.pico: cram/sam_header.c config.h $(cram_sam_header_h) cram/string_alloc.h cram/sam_header.o cram/sam_header.pico: cram/sam_header.c config.h $(htslib_hts_log_h) $(cram_sam_header_h) cram/string_alloc.h cram/string_alloc.o cram/string_alloc.pico: cram/string_alloc.c config.h cram/string_alloc.h thread_pool.o thread_pool.pico: thread_pool.c config.h $(thread_pool_internal_h) Loading Loading @@ -359,7 +360,7 @@ check test: $(BUILT_PROGRAMS) $(BUILT_TEST_PROGRAMS) test/hfile test/test_bgzf test/bgziptest.txt cd test/tabix && ./test-tabix.sh tabix.tst REF_PATH=: test/sam test/ce.fa test/faidx.fa REF_PATH=: test/sam test/ce.fa test/faidx.fa test/fastqs.fq test/test-regidx cd test && REF_PATH=: ./test.pl $${TEST_OPTS:-} Loading Loading @@ -399,18 +400,18 @@ test/test-bcf-sr: test/test-bcf-sr.o libhts.a test/test-bcf-translate: test/test-bcf-translate.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test-bcf-translate.o libhts.a -lz $(LIBS) -lpthread test/hts_endian.o: test/hts_endian.c $(htslib_hts_endian_h) test/hts_endian.o: test/hts_endian.c config.h $(htslib_hts_endian_h) test/fieldarith.o: test/fieldarith.c config.h $(htslib_sam_h) test/hfile.o: test/hfile.c config.h $(htslib_hfile_h) $(htslib_hts_defs_h) test/sam.o: test/sam.c config.h $(htslib_hts_defs_h) $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) test/test_bgzf.o: test/test_bgzf.c $(htslib_bgzf_h) $(htslib_hfile_h) test/test-realn.o: test/test_realn.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) test/test_bgzf.o: test/test_bgzf.c config.h $(htslib_bgzf_h) $(htslib_hfile_h) $(hfile_internal_h) test/test-realn.o: test/test_realn.c config.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) test/test-regidx.o: test/test-regidx.c config.h $(htslib_regidx_h) $(hts_internal_h) test/test_view.o: test/test_view.c config.h $(cram_h) $(htslib_sam_h) test/test-vcf-api.o: test/test-vcf-api.c config.h $(htslib_hts_h) $(htslib_vcf_h) $(htslib_kstring_h) $(htslib_kseq_h) test/test-vcf-sweep.o: test/test-vcf-sweep.c config.h $(htslib_vcf_sweep_h) test/test-bcf-sr.o: test/test-bcf-sr.c config.h $(htslib_vcf_sweep_h) bcf_sr_sort.h test/test-bcf-translate.o: test/test-bcf-translate.c config.h test/test-bcf-sr.o: test/test-bcf-sr.c config.h $(htslib_synced_bcf_reader_h) test/test-bcf-translate.o: test/test-bcf-translate.c config.h $(htslib_vcf_h) test/thrash_threads1: test/thrash_threads1.o libhts.a Loading NEWS +71 −0 Original line number Diff line number Diff line Noteworthy changes in release 1.9 (18th July 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * If `./configure` fails, `make` will stop working until either configure is re-run successfully, or `make distclean` is used. This makes configuration failures more obvious. (#711, thanks to John Marshall) * The default SAM version has been changed to 1.6. This is in line with the latest version specification and indicates that HTSlib supports the CG tag used to store long CIGAR data in BAM format. * bgzip integrity check option '--test' (#682, thanks to @sd4B75bJ, @jrayner) * Faidx can now index fastq files as well as fasta. The fastq index adds an extra column to the `.fai` index which gives the offset to the quality values. New interfaces have been added to `htslib/faidx.h` to read the fastq index and retrieve the quality values. It is possible to open a fastq index as if fasta (only sequences will be returned), but not the other way round. (#701) * New API interfaces to add or update integer, float and array aux tags. (#694) * Add `level=<number>` option to `hts_set_opt()` to allow the compression level to be set. Setting `level=0` enables uncompressed output. (#715) * Improved bgzip error reporting. * Better error reporting when CRAM reference files can't be opened. (#706) * Fixes to make tests work properly on Windows/MinGW - mainly to handle line ending differences. (#716) * Efficiency improvements: - Small speed-up for CRAM indexing. - Reduce the number of unnecessary wake-ups in the thread pool. (#703) - Avoid some memory copies when writing data, notably for uncompressed BGZF output. (#703) * Bug fixes: - Fix multi-region iterator bugs on CRAM files. (#684) - Fixed multi-region iterator bug that caused some reads to be skipped incorrectly when reading BAM files. (#687) - Fixed synced_bcf_reader() bug when reading contigs multiple times. (#691, reported by @freeseek) - Fixed bug where bcf_hdr_set_samples() did not update the sample dictionary when removing samples. (#692, reported by @freeseek) - Fixed bug where the VCF record ref length was calculated incorrectly if an INFO END tag was present. (71b00a) - Fixed warnings found when compiling with gcc 8.1.0. (#700) - sam_hdr_read() and sam_hdr_write() will now return an error code if passed a NULL file pointer, instead of crashing. - Fixed possible negative array look-up in sam_parse1() that somehow escaped previous fuzz testing. (#731, reported by @fCorleone) - Fixed bug where cram range queries could incorrectly report an error when using multiple threads. (#734, reported by Brent Pedersen) - Fixed very rare rANS normalisation bug that could cause an assertion failure when writing CRAM files. (#739, reported by @carsonhh) Noteworthy changes in release 1.8 (3rd April 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading bcf_sr_sort.c +6 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ THE SOFTWARE. */ #include <config.h> #include <strings.h> #include "bcf_sr_sort.h" Loading Loading @@ -645,6 +647,10 @@ sr_sort_t *bcf_sr_sort_init(sr_sort_t *srt) memset(srt,0,sizeof(sr_sort_t)); return srt; } void bcf_sr_sort_reset(sr_sort_t *srt) { srt->chr = NULL; } void bcf_sr_sort_destroy(sr_sort_t *srt) { free(srt->active); Loading Loading
INSTALL +44 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ Requirements ============ Building HTSlib requires a few programs and libraries to be present. See the "System Specific Details" below for guidance on how to install these. At least the following are required: GNU make Loading @@ -29,7 +32,7 @@ library itself, and include files needed to compile code that uses functions from the library. Note that some Linux distributions put include files in a development ('-dev' or '-devel') package separate from the main library. libz (required) zlib (required) libbz2 (required, unless configured with --disable-bz2) liblzma (required, unless configured with --disable-lzma) libcurl (optional, but strongly recommended) Loading Loading @@ -200,3 +203,42 @@ For example, make DESTDIR=/tmp/staging prefix=/opt would install into bin, lib, etc subdirectories under /tmp/staging/opt. System Specific Details ======================= Installing the prerequisites is system dependent and there is more than one correct way of satisfying these, including downloading them from source, compiling and installing them yourself. For people with super-user access, we provide an example set of commands below for installing the dependencies on a variety of operating system distributions. Note these are not specific recommendations on distribution, compiler or SSL implementation. It is assumed you already have the core set of packages for the given distribution - the lists may be incomplete if this is not the case. Debian / Ubuntu --------------- sudo apt-get update # Ensure the package list is up to date sudo apt-get install autoconf automake make gcc perl zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev Note: libcurl4-openssl-dev can be used as an alternative to libcurl4-gnutls-dev. RedHat / CentOS --------------- sudo yum install autoconf automake make gcc perl-Data-Dumper zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel Alpine Linux ------------ sudo apk update # Ensure the package list is up to date sudo apk add autoconf automake make gcc musl-dev perl bash zlib-dev bzip2-dev xz-dev curl-dev libressl-dev OpenSUSE -------- sudo zypper install autoconf automake make gcc perl zlib-devel libbz2-devel xz-devel libcurl-devel libopenssl-devel
LICENSE +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ according to the terms of the following MIT/Expat license.] The MIT/Expat License Copyright (C) 2012-2014 Genome Research Ltd. Copyright (C) 2012-2018 Genome Research Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Loading @@ -29,7 +29,7 @@ according to the terms of the following Modified 3-Clause BSD license.] The Modified-BSD License Copyright (C) 2012-2014 Genome Research Ltd. Copyright (C) 2012-2018 Genome Research Ltd. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Loading
Makefile +18 −17 Original line number Diff line number Diff line Loading @@ -174,8 +174,9 @@ cram_misc_h = cram/misc.h $(cram_os_h) cram_os_h = cram/os.h $(htslib_hts_endian_h) cram_sam_header_h = cram/sam_header.h cram/string_alloc.h cram/pooled_alloc.h $(htslib_khash_h) $(htslib_kstring_h) cram_samtools_h = cram/cram_samtools.h $(htslib_sam_h) $(cram_sam_header_h) cram_structs_h = cram/cram_structs.h $(htslib_thread_pool_h) cram/string_alloc.h $(htslib_khash_h) cram_structs_h = cram/cram_structs.h $(htslib_thread_pool_h) cram/string_alloc.h cram/mFILE.h $(htslib_khash_h) cram_open_trace_file_h = cram/open_trace_file.h cram/mFILE.h bcf_sr_sort_h = bcf_sr_sort.h $(htslib_synced_bcf_reader_h) $(htslib_kbitset_h) hfile_internal_h = hfile_internal.h $(htslib_hfile_h) $(textutils_internal_h) hts_internal_h = hts_internal.h $(htslib_hts_h) $(textutils_internal_h) textutils_internal_h = textutils_internal.h $(htslib_kstring_h) Loading Loading @@ -288,23 +289,23 @@ hts-$(LIBHTS_SOVERSION).dll: $(LIBHTS_OBJS) $(CC) -shared $(LDFLAGS) -o $@ $< hts.dll.a $(LIBS) bgzf.o bgzf.pico: bgzf.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(htslib_hfile_h) $(htslib_thread_pool_h) cram/pooled_alloc.h $(htslib_khash_h) errmod.o errmod.pico: errmod.c config.h $(htslib_hts_h) $(htslib_ksort_h) bgzf.o bgzf.pico: bgzf.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(htslib_hfile_h) $(htslib_thread_pool_h) $(htslib_hts_endian_h) cram/pooled_alloc.h $(htslib_khash_h) errmod.o errmod.pico: errmod.c config.h $(htslib_hts_h) $(htslib_ksort_h) $(htslib_hts_os_h) kstring.o kstring.pico: kstring.c config.h $(htslib_kstring_h) knetfile.o knetfile.pico: knetfile.c config.h $(htslib_hts_log_h) $(htslib_knetfile_h) hfile.o hfile.pico: hfile.c config.h $(htslib_hfile_h) $(hfile_internal_h) $(hts_internal_h) $(htslib_khash_h) hfile_gcs.o hfile_gcs.pico: hfile_gcs.c config.h $(htslib_hts_h) $(htslib_kstring_h) $(hfile_internal_h) hfile_libcurl.o hfile_libcurl.pico: hfile_libcurl.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) hfile_libcurl.o hfile_libcurl.pico: hfile_libcurl.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) $(htslib_khash_h) hfile_net.o hfile_net.pico: hfile_net.c config.h $(hfile_internal_h) $(htslib_knetfile_h) hfile_s3.o hfile_s3.pico: hfile_s3.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) hts.o hts.pico: hts.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(cram_h) $(hfile_internal_h) $(htslib_hfile_h) version.h $(hts_internal_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_ksort_h) hts.o hts.pico: hts.c config.h $(htslib_hts_h) $(htslib_bgzf_h) $(cram_h) $(htslib_hfile_h) $(htslib_hts_endian_h) version.h $(hts_internal_h) $(hfile_internal_h) $(htslib_hts_os_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_ksort_h) hts_os.o hts_os.pico: hts_os.c config.h os/rand.c vcf.o vcf.pico: vcf.c config.h $(htslib_vcf_h) $(htslib_bgzf_h) $(htslib_tbx_h) $(htslib_hfile_h) $(hts_internal_h) $(htslib_khash_str2int_h) $(htslib_kstring_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_hts_endian_h) sam.o sam.pico: sam.c config.h $(htslib_sam_h) $(htslib_bgzf_h) $(cram_h) $(hts_internal_h) $(htslib_hfile_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_kstring_h) $(htslib_hts_endian_h) tbx.o tbx.pico: tbx.c config.h $(htslib_tbx_h) $(htslib_bgzf_h) $(hts_internal_h) $(htslib_khash_h) tbx.o tbx.pico: tbx.c config.h $(htslib_tbx_h) $(htslib_bgzf_h) $(htslib_hts_endian_h) $(hts_internal_h) $(htslib_khash_h) faidx.o faidx.pico: faidx.c config.h $(htslib_bgzf_h) $(htslib_faidx_h) $(htslib_hfile_h) $(htslib_khash_h) $(htslib_kstring_h) $(hts_internal_h) bcf_sr_sort.o bcf_sr_sort.pico: bcf_sr_sort.c config.h bcf_sr_sort.h $(htslib_kseq_h) $(htslib_khash_str2int_h) synced_bcf_reader.o synced_bcf_reader.pico: synced_bcf_reader.c config.h bcf_sr_sort.h $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(htslib_bgzf_h) $(htslib_thread_pool_h) bcf_sr_sort.o bcf_sr_sort.pico: bcf_sr_sort.c config.h $(bcf_sr_sort_h) $(htslib_khash_str2int_h) synced_bcf_reader.o synced_bcf_reader.pico: synced_bcf_reader.c config.h $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(htslib_bgzf_h) $(htslib_thread_pool_h) $(bcf_sr_sort_h) vcf_sweep.o vcf_sweep.pico: vcf_sweep.c config.h $(htslib_vcf_sweep_h) $(htslib_bgzf_h) vcfutils.o vcfutils.pico: vcfutils.c config.h $(htslib_vcfutils_h) $(htslib_kbitset_h) kfunc.o kfunc.pico: kfunc.c config.h $(htslib_kfunc_h) Loading @@ -325,11 +326,11 @@ cram/cram_io.o cram/cram_io.pico: cram/cram_io.c config.h os/lzma_stub.h $(cram_ cram/cram_samtools.o cram/cram_samtools.pico: cram/cram_samtools.c config.h $(cram_h) $(htslib_sam_h) cram/cram_stats.o cram/cram_stats.pico: cram/cram_stats.c config.h $(cram_h) $(cram_os_h) cram/files.o cram/files.pico: cram/files.c config.h $(cram_misc_h) cram/mFILE.o cram/mFILE.pico: cram/mFILE.c config.h $(cram_os_h) cram/mFILE.h cram/open_trace_file.o cram/open_trace_file.pico: cram/open_trace_file.c config.h $(cram_os_h) $(cram_open_trace_file_h) $(cram_misc_h) $(htslib_hfile_h) cram/mFILE.o cram/mFILE.pico: cram/mFILE.c config.h $(htslib_hts_log_h) $(cram_os_h) cram/mFILE.h cram/open_trace_file.o cram/open_trace_file.pico: cram/open_trace_file.c config.h $(cram_os_h) $(cram_open_trace_file_h) $(cram_misc_h) $(htslib_hfile_h) $(htslib_hts_log_h) cram/pooled_alloc.o cram/pooled_alloc.pico: cram/pooled_alloc.c config.h cram/pooled_alloc.h $(cram_misc_h) cram/rANS_static.o cram/rANS_static.pico: cram/rANS_static.c config.h cram/rANS_static.h cram/rANS_byte.h cram/sam_header.o cram/sam_header.pico: cram/sam_header.c config.h $(cram_sam_header_h) cram/string_alloc.h cram/sam_header.o cram/sam_header.pico: cram/sam_header.c config.h $(htslib_hts_log_h) $(cram_sam_header_h) cram/string_alloc.h cram/string_alloc.o cram/string_alloc.pico: cram/string_alloc.c config.h cram/string_alloc.h thread_pool.o thread_pool.pico: thread_pool.c config.h $(thread_pool_internal_h) Loading Loading @@ -359,7 +360,7 @@ check test: $(BUILT_PROGRAMS) $(BUILT_TEST_PROGRAMS) test/hfile test/test_bgzf test/bgziptest.txt cd test/tabix && ./test-tabix.sh tabix.tst REF_PATH=: test/sam test/ce.fa test/faidx.fa REF_PATH=: test/sam test/ce.fa test/faidx.fa test/fastqs.fq test/test-regidx cd test && REF_PATH=: ./test.pl $${TEST_OPTS:-} Loading Loading @@ -399,18 +400,18 @@ test/test-bcf-sr: test/test-bcf-sr.o libhts.a test/test-bcf-translate: test/test-bcf-translate.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test-bcf-translate.o libhts.a -lz $(LIBS) -lpthread test/hts_endian.o: test/hts_endian.c $(htslib_hts_endian_h) test/hts_endian.o: test/hts_endian.c config.h $(htslib_hts_endian_h) test/fieldarith.o: test/fieldarith.c config.h $(htslib_sam_h) test/hfile.o: test/hfile.c config.h $(htslib_hfile_h) $(htslib_hts_defs_h) test/sam.o: test/sam.c config.h $(htslib_hts_defs_h) $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) test/test_bgzf.o: test/test_bgzf.c $(htslib_bgzf_h) $(htslib_hfile_h) test/test-realn.o: test/test_realn.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) test/test_bgzf.o: test/test_bgzf.c config.h $(htslib_bgzf_h) $(htslib_hfile_h) $(hfile_internal_h) test/test-realn.o: test/test_realn.c config.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) test/test-regidx.o: test/test-regidx.c config.h $(htslib_regidx_h) $(hts_internal_h) test/test_view.o: test/test_view.c config.h $(cram_h) $(htslib_sam_h) test/test-vcf-api.o: test/test-vcf-api.c config.h $(htslib_hts_h) $(htslib_vcf_h) $(htslib_kstring_h) $(htslib_kseq_h) test/test-vcf-sweep.o: test/test-vcf-sweep.c config.h $(htslib_vcf_sweep_h) test/test-bcf-sr.o: test/test-bcf-sr.c config.h $(htslib_vcf_sweep_h) bcf_sr_sort.h test/test-bcf-translate.o: test/test-bcf-translate.c config.h test/test-bcf-sr.o: test/test-bcf-sr.c config.h $(htslib_synced_bcf_reader_h) test/test-bcf-translate.o: test/test-bcf-translate.c config.h $(htslib_vcf_h) test/thrash_threads1: test/thrash_threads1.o libhts.a Loading
NEWS +71 −0 Original line number Diff line number Diff line Noteworthy changes in release 1.9 (18th July 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * If `./configure` fails, `make` will stop working until either configure is re-run successfully, or `make distclean` is used. This makes configuration failures more obvious. (#711, thanks to John Marshall) * The default SAM version has been changed to 1.6. This is in line with the latest version specification and indicates that HTSlib supports the CG tag used to store long CIGAR data in BAM format. * bgzip integrity check option '--test' (#682, thanks to @sd4B75bJ, @jrayner) * Faidx can now index fastq files as well as fasta. The fastq index adds an extra column to the `.fai` index which gives the offset to the quality values. New interfaces have been added to `htslib/faidx.h` to read the fastq index and retrieve the quality values. It is possible to open a fastq index as if fasta (only sequences will be returned), but not the other way round. (#701) * New API interfaces to add or update integer, float and array aux tags. (#694) * Add `level=<number>` option to `hts_set_opt()` to allow the compression level to be set. Setting `level=0` enables uncompressed output. (#715) * Improved bgzip error reporting. * Better error reporting when CRAM reference files can't be opened. (#706) * Fixes to make tests work properly on Windows/MinGW - mainly to handle line ending differences. (#716) * Efficiency improvements: - Small speed-up for CRAM indexing. - Reduce the number of unnecessary wake-ups in the thread pool. (#703) - Avoid some memory copies when writing data, notably for uncompressed BGZF output. (#703) * Bug fixes: - Fix multi-region iterator bugs on CRAM files. (#684) - Fixed multi-region iterator bug that caused some reads to be skipped incorrectly when reading BAM files. (#687) - Fixed synced_bcf_reader() bug when reading contigs multiple times. (#691, reported by @freeseek) - Fixed bug where bcf_hdr_set_samples() did not update the sample dictionary when removing samples. (#692, reported by @freeseek) - Fixed bug where the VCF record ref length was calculated incorrectly if an INFO END tag was present. (71b00a) - Fixed warnings found when compiling with gcc 8.1.0. (#700) - sam_hdr_read() and sam_hdr_write() will now return an error code if passed a NULL file pointer, instead of crashing. - Fixed possible negative array look-up in sam_parse1() that somehow escaped previous fuzz testing. (#731, reported by @fCorleone) - Fixed bug where cram range queries could incorrectly report an error when using multiple threads. (#734, reported by Brent Pedersen) - Fixed very rare rANS normalisation bug that could cause an assertion failure when writing CRAM files. (#739, reported by @carsonhh) Noteworthy changes in release 1.8 (3rd April 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading
bcf_sr_sort.c +6 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ THE SOFTWARE. */ #include <config.h> #include <strings.h> #include "bcf_sr_sort.h" Loading Loading @@ -645,6 +647,10 @@ sr_sort_t *bcf_sr_sort_init(sr_sort_t *srt) memset(srt,0,sizeof(sr_sort_t)); return srt; } void bcf_sr_sort_reset(sr_sort_t *srt) { srt->chr = NULL; } void bcf_sr_sort_destroy(sr_sort_t *srt) { free(srt->active); Loading