Loading .appveyor.ymldeleted 100644 → 0 +0 −39 Original line number Diff line number Diff line # version format. # you can use {branch} name in version format too # version: 1.0.{build}-{branch} version: 'vers.{build}' # branches to build branches: # Blacklist except: - gh-pages # Do not build on tags (GitHub and BitBucket) skip_tags: true # Skipping commits affecting specific files (GitHub only). More details here: /docs/appveyor-yml #skip_commits: # files: # - docs/* # - '**/*.html' # We use Mingw/Msys, so use pacman for installs install: - set HOME=. - set MSYSTEM=MINGW64 - set PATH=C:/msys64/usr/bin;C:/msys64/mingw64/bin;%PATH% - set MINGWPREFIX=x86_64-w64-mingw32 - "sh -lc \"pacman -S --noconfirm --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib mingw-w64-x86_64-bzip2 mingw-w64-x86_64-xz mingw-w64-x86_64-curl\"" build_script: - set HOME=. - set MSYSTEM=MINGW64 - set PATH=C:/msys64/usr/bin;C:/msys64/mingw64/bin;%PATH% - "sh -lc \"aclocal && autoheader && autoconf && ./configure && make -j2\"" #build_script: # - make test_script: - "sh -lc \"make test\"" INSTALL +16 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,12 @@ various features and specify further optional external requirements: by default. It can be disabled with --disable-lzma, but be aware that not all CRAM files may be possible to decode. --with-libdeflate Libdeflate is a heavily optimized library for DEFLATE-based compression and decompression. It also includes a fast crc32 implementation. By default, ./configure will probe for libdeflate and use it if available. To prevent this, use --without-libdeflate. The configure script also accepts the usual options and environment variables for tuning installation locations and compilers: type './configure --help' for details. For example, Loading @@ -158,6 +164,16 @@ for details. For example, would specify that HTSlib is to be built with icc and installed into bin, lib, etc subdirectories under /opt/icc-compiled. If dependencies have been installed in non-standard locations (i.e. not on the normal include and library search paths) then the CPPFLAGS and LDFLAGS environment variables can be used to set the options needed to find them. For example, NetBSD users may use: ./configure CPPFLAGS=-I/usr/pkg/include \ LDFLAGS='-L/usr/pkg/lib -Wl,-R/usr/pkg/lib' to allow compiling and linking against dependencies installed via the ports collection. Installation Locations ====================== Loading Makefile +6 −1 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ BUILT_TEST_PROGRAMS = \ test/hfile \ test/sam \ test/test_bgzf \ test/test_realn \ test/test-regidx \ test/test_view \ test/test-vcf-api \ Loading Loading @@ -377,6 +378,9 @@ test/sam: test/sam.o libhts.a test/test_bgzf: test/test_bgzf.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test_bgzf.o libhts.a -lz $(LIBS) -lpthread test/test_realn: test/test_realn.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test_realn.o libhts.a $(LIBS) -lpthread test/test-regidx: test/test-regidx.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test-regidx.o libhts.a $(LIBS) -lpthread Loading @@ -400,6 +404,7 @@ 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-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) Loading Loading @@ -434,7 +439,7 @@ install: libhts.a $(BUILT_PROGRAMS) $(BUILT_PLUGINS) installdirs install-$(SHLIB if test -n "$(BUILT_PLUGINS)"; then $(INSTALL_PROGRAM) $(BUILT_PLUGINS) $(DESTDIR)$(plugindir); fi $(INSTALL_DATA) htslib/*.h $(DESTDIR)$(includedir)/htslib $(INSTALL_DATA) libhts.a $(DESTDIR)$(libdir)/libhts.a $(INSTALL_MAN) htsfile.1 tabix.1 $(DESTDIR)$(man1dir) $(INSTALL_MAN) bgzip.1 htsfile.1 tabix.1 $(DESTDIR)$(man1dir) $(INSTALL_MAN) faidx.5 sam.5 vcf.5 $(DESTDIR)$(man5dir) installdirs: Loading NEWS +48 −0 Original line number Diff line number Diff line Noteworthy changes in release 1.8 (3rd April 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * The URL to get sequences from the EBI reference server has been changed to https://. This is because the EBI no longer serve sequences via plain HTTP - requests to the http:// endpoint just get redirected. HTSlib needs to be linked against libcurl to download https:// URLs, so CRAM users who want to get references from the EBI will need to run configure and ensure libcurl support is enabled using the --enable-libcurl option. * Added libdeflate as a build option for alternative faster compression and decompression. Results vary by CPU but compression should be twice as fast and decompression faster. * It is now possible to set the compression level in bgzip. (#675; thanks to Nathan Weeks). * bgzip now gets its own manual page. * CRAM encoding now stored MD and NM tags verbatim where the reference contains 'N' characters, to work around ambiguities in the SAM specification (samtools #717/762). Also added "store_md" and "store_nm" cram-options for forcing these tags to be stored at all locations. This is best when combined with a subsequent decode_md=0 option while reading CRAM. * Multiple CRAM bug fixes, including a fix to free and the subsequent reuse of references with `-T ref.fa`. (#654; reported by Chris Saunders) * CRAM multi-threading bugs fixed: don't try to call flush on reading; processing of multiple range queries; problems with multi-slice containers. * Fixed crashes caused when decoding some cramtools produced CRAM files. * Fixed a couple of minor rANS issues with handling invalid data. * Fixed bug where probaln_glocal() tried to allocate far more memory than needed when the query sequence was much longer than the reference. This caused crashes in samtools and bcftools mpileup when used on data with very long reads. (#572, problem reported by Felix Bemm via minimap2). * sam_prop_realn() now returns -1 (the same value as for unmapped reads) on reads that do not include at least one 'M', 'X' or '=' CIGAR operator, and no longer adds BQ or ZQ tags. BAQ adjustments are only made to bases covered by these operators so there is no point in trying to align reads that do not have them. (#572) Noteworthy changes in release 1.7 (26th January 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading bcf_sr_sort.c +10 −4 Original line number Diff line number Diff line Loading @@ -627,12 +627,18 @@ int bcf_sr_sort_next(bcf_srs_t *readers, sr_sort_t *srt, const char *chr, int mi return nret; } void bcf_sr_sort_remove_reader(bcf_srs_t *readers, sr_sort_t *srt, int i) { //vcf_buf is allocated only in bcf_sr_sort_next //So, a call to bcf_sr_add_reader() followed immediately by bcf_sr_remove_reader() //would cause the program to crash in this segment if (srt->vcf_buf) { free(srt->vcf_buf[i].rec); if ( i+1 < srt->nsr ) memmove(&srt->vcf_buf[i], &srt->vcf_buf[i+1], (srt->nsr - i - 1)*sizeof(vcf_buf_t)); memset(srt->vcf_buf + srt->nsr - 1, 0, sizeof(vcf_buf_t)); } } sr_sort_t *bcf_sr_sort_init(sr_sort_t *srt) { if ( !srt ) return calloc(1,sizeof(sr_sort_t)); Loading Loading
.appveyor.ymldeleted 100644 → 0 +0 −39 Original line number Diff line number Diff line # version format. # you can use {branch} name in version format too # version: 1.0.{build}-{branch} version: 'vers.{build}' # branches to build branches: # Blacklist except: - gh-pages # Do not build on tags (GitHub and BitBucket) skip_tags: true # Skipping commits affecting specific files (GitHub only). More details here: /docs/appveyor-yml #skip_commits: # files: # - docs/* # - '**/*.html' # We use Mingw/Msys, so use pacman for installs install: - set HOME=. - set MSYSTEM=MINGW64 - set PATH=C:/msys64/usr/bin;C:/msys64/mingw64/bin;%PATH% - set MINGWPREFIX=x86_64-w64-mingw32 - "sh -lc \"pacman -S --noconfirm --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib mingw-w64-x86_64-bzip2 mingw-w64-x86_64-xz mingw-w64-x86_64-curl\"" build_script: - set HOME=. - set MSYSTEM=MINGW64 - set PATH=C:/msys64/usr/bin;C:/msys64/mingw64/bin;%PATH% - "sh -lc \"aclocal && autoheader && autoconf && ./configure && make -j2\"" #build_script: # - make test_script: - "sh -lc \"make test\""
INSTALL +16 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,12 @@ various features and specify further optional external requirements: by default. It can be disabled with --disable-lzma, but be aware that not all CRAM files may be possible to decode. --with-libdeflate Libdeflate is a heavily optimized library for DEFLATE-based compression and decompression. It also includes a fast crc32 implementation. By default, ./configure will probe for libdeflate and use it if available. To prevent this, use --without-libdeflate. The configure script also accepts the usual options and environment variables for tuning installation locations and compilers: type './configure --help' for details. For example, Loading @@ -158,6 +164,16 @@ for details. For example, would specify that HTSlib is to be built with icc and installed into bin, lib, etc subdirectories under /opt/icc-compiled. If dependencies have been installed in non-standard locations (i.e. not on the normal include and library search paths) then the CPPFLAGS and LDFLAGS environment variables can be used to set the options needed to find them. For example, NetBSD users may use: ./configure CPPFLAGS=-I/usr/pkg/include \ LDFLAGS='-L/usr/pkg/lib -Wl,-R/usr/pkg/lib' to allow compiling and linking against dependencies installed via the ports collection. Installation Locations ====================== Loading
Makefile +6 −1 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ BUILT_TEST_PROGRAMS = \ test/hfile \ test/sam \ test/test_bgzf \ test/test_realn \ test/test-regidx \ test/test_view \ test/test-vcf-api \ Loading Loading @@ -377,6 +378,9 @@ test/sam: test/sam.o libhts.a test/test_bgzf: test/test_bgzf.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test_bgzf.o libhts.a -lz $(LIBS) -lpthread test/test_realn: test/test_realn.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test_realn.o libhts.a $(LIBS) -lpthread test/test-regidx: test/test-regidx.o libhts.a $(CC) $(LDFLAGS) -o $@ test/test-regidx.o libhts.a $(LIBS) -lpthread Loading @@ -400,6 +404,7 @@ 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-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) Loading Loading @@ -434,7 +439,7 @@ install: libhts.a $(BUILT_PROGRAMS) $(BUILT_PLUGINS) installdirs install-$(SHLIB if test -n "$(BUILT_PLUGINS)"; then $(INSTALL_PROGRAM) $(BUILT_PLUGINS) $(DESTDIR)$(plugindir); fi $(INSTALL_DATA) htslib/*.h $(DESTDIR)$(includedir)/htslib $(INSTALL_DATA) libhts.a $(DESTDIR)$(libdir)/libhts.a $(INSTALL_MAN) htsfile.1 tabix.1 $(DESTDIR)$(man1dir) $(INSTALL_MAN) bgzip.1 htsfile.1 tabix.1 $(DESTDIR)$(man1dir) $(INSTALL_MAN) faidx.5 sam.5 vcf.5 $(DESTDIR)$(man5dir) installdirs: Loading
NEWS +48 −0 Original line number Diff line number Diff line Noteworthy changes in release 1.8 (3rd April 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * The URL to get sequences from the EBI reference server has been changed to https://. This is because the EBI no longer serve sequences via plain HTTP - requests to the http:// endpoint just get redirected. HTSlib needs to be linked against libcurl to download https:// URLs, so CRAM users who want to get references from the EBI will need to run configure and ensure libcurl support is enabled using the --enable-libcurl option. * Added libdeflate as a build option for alternative faster compression and decompression. Results vary by CPU but compression should be twice as fast and decompression faster. * It is now possible to set the compression level in bgzip. (#675; thanks to Nathan Weeks). * bgzip now gets its own manual page. * CRAM encoding now stored MD and NM tags verbatim where the reference contains 'N' characters, to work around ambiguities in the SAM specification (samtools #717/762). Also added "store_md" and "store_nm" cram-options for forcing these tags to be stored at all locations. This is best when combined with a subsequent decode_md=0 option while reading CRAM. * Multiple CRAM bug fixes, including a fix to free and the subsequent reuse of references with `-T ref.fa`. (#654; reported by Chris Saunders) * CRAM multi-threading bugs fixed: don't try to call flush on reading; processing of multiple range queries; problems with multi-slice containers. * Fixed crashes caused when decoding some cramtools produced CRAM files. * Fixed a couple of minor rANS issues with handling invalid data. * Fixed bug where probaln_glocal() tried to allocate far more memory than needed when the query sequence was much longer than the reference. This caused crashes in samtools and bcftools mpileup when used on data with very long reads. (#572, problem reported by Felix Bemm via minimap2). * sam_prop_realn() now returns -1 (the same value as for unmapped reads) on reads that do not include at least one 'M', 'X' or '=' CIGAR operator, and no longer adds BQ or ZQ tags. BAQ adjustments are only made to bases covered by these operators so there is no point in trying to align reads that do not have them. (#572) Noteworthy changes in release 1.7 (26th January 2018) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading
bcf_sr_sort.c +10 −4 Original line number Diff line number Diff line Loading @@ -627,12 +627,18 @@ int bcf_sr_sort_next(bcf_srs_t *readers, sr_sort_t *srt, const char *chr, int mi return nret; } void bcf_sr_sort_remove_reader(bcf_srs_t *readers, sr_sort_t *srt, int i) { //vcf_buf is allocated only in bcf_sr_sort_next //So, a call to bcf_sr_add_reader() followed immediately by bcf_sr_remove_reader() //would cause the program to crash in this segment if (srt->vcf_buf) { free(srt->vcf_buf[i].rec); if ( i+1 < srt->nsr ) memmove(&srt->vcf_buf[i], &srt->vcf_buf[i+1], (srt->nsr - i - 1)*sizeof(vcf_buf_t)); memset(srt->vcf_buf + srt->nsr - 1, 0, sizeof(vcf_buf_t)); } } sr_sort_t *bcf_sr_sort_init(sr_sort_t *srt) { if ( !srt ) return calloc(1,sizeof(sr_sort_t)); Loading