Skip to content

Commit 86e74e0

Browse files
committed
Release 1.23
2 parents c1f35d6 + ee4301e commit 86e74e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4673
-1997
lines changed

Makefile

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile for htslib, a C library for high-throughput sequencing data formats.
22
#
3-
# Copyright (C) 2013-2024 Genome Research Ltd.
3+
# Copyright (C) 2013-2025 Genome Research Ltd.
44
#
55
# Author: John Marshall <[email protected]>
66
#
@@ -158,8 +158,8 @@ LIBHTS_SOVERSION = 3
158158
# is not strictly necessary and should be removed the next time
159159
# LIBHTS_SOVERSION is bumped (see #1144 and
160160
# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW23)
161-
MACH_O_COMPATIBILITY_VERSION = 3.1.22
162-
MACH_O_CURRENT_VERSION = 3.1.22
161+
MACH_O_COMPATIBILITY_VERSION = 3.1.23
162+
MACH_O_CURRENT_VERSION = 3.1.23
163163

164164
# Force version.h to be remade if $(PACKAGE_VERSION) has changed.
165165
version.h: $(if $(wildcard version.h),$(if $(findstring "$(PACKAGE_VERSION)",$(shell cat version.h)),,force))
@@ -267,6 +267,7 @@ NONCONFIGURE_OBJS = hfile_libcurl.o
267267
PLUGIN_EXT =
268268
PLUGIN_OBJS =
269269

270+
bgzf_internal_h = bgzf_internal.h $(htslib_bgzf_h)
270271
cram_h = cram/cram.h $(cram_samtools_h) $(header_h) $(cram_structs_h) $(cram_io_h) cram/cram_encode.h cram/cram_decode.h cram/cram_stats.h cram/cram_codecs.h cram/cram_index.h $(htslib_cram_h)
271272
cram_io_h = cram/cram_io.h $(cram_misc_h)
272273
cram_misc_h = cram/misc.h
@@ -276,7 +277,7 @@ cram_structs_h = cram/cram_structs.h $(htslib_thread_pool_h) $(htslib_cram_h) cr
276277
cram_open_trace_file_h = cram/open_trace_file.h cram/mFILE.h
277278
bcf_sr_sort_h = bcf_sr_sort.h $(htslib_synced_bcf_reader_h) $(htslib_kbitset_h)
278279
fuzz_settings_h = fuzz_settings.h
279-
header_h = header.h cram/string_alloc.h cram/pooled_alloc.h $(htslib_khash_h) $(htslib_kstring_h) $(htslib_sam_h)
280+
header_h = header.h cram/string_alloc.h cram/pooled_alloc.h $(htslib_khash_h) $(htslib_kstring_h) $(htslib_sam_h) $(htslib_hts_h)
280281
hfile_internal_h = hfile_internal.h $(htslib_hts_defs_h) $(htslib_hfile_h) $(textutils_internal_h)
281282
hts_internal_h = hts_internal.h $(htslib_hts_h) $(textutils_internal_h)
282283
hts_time_funcs_h = hts_time_funcs.h
@@ -328,13 +329,18 @@ config.h:
328329
if [ "x$(HTS_BUILD_AVX512)" != "x" ] ; then \
329330
echo '#define HAVE_AVX512 1' >> $@ ; \
330331
fi
332+
echo '#if defined __x86_64__ && (defined HAVE_SSSE3 || defined HAVE_AVX2 || defined HAVE_AVX512)' >> $@
333+
echo '#define HAVE_X86INTRIN_H 1' >> $@
334+
echo '#endif' >> $@
331335
echo '#if defined __x86_64__ || defined __arm__ || defined __aarch64__' >> $@
332336
echo '#define HAVE_ATTRIBUTE_CONSTRUCTOR 1' >> $@
333337
echo '#endif' >> $@
334-
echo '#if (defined(__x86_64__) || defined(_M_X64))' >> $@
335-
echo '#define HAVE_ATTRIBUTE_TARGET_SSSE3 1' >> $@
336-
echo '#define HAVE_BUILTIN_CPU_SUPPORT_SSSE3 1' >> $@
337-
echo '#endif' >> $@
338+
if [ "x$(HTS_HAVE_SSSE3_BUILTINS)" != "x" ]; then \
339+
echo '#if (defined(__x86_64__) || defined(_M_X64))' >> $@ ; \
340+
echo '#define HAVE_ATTRIBUTE_TARGET_SSSE3 1' >> $@ ; \
341+
echo '#define HAVE_BUILTIN_CPU_SUPPORT_SSSE3 1' >> $@ ; \
342+
echo '#endif' >> $@ ; \
343+
fi
338344
echo '#if defined __linux__' >> $@
339345
echo '#define HAVE_GETAUXVAL' >> $@
340346
echo '#elif defined __FreeBSD__' >> $@
@@ -487,19 +493,18 @@ hts-object-files: $(LIBHTS_OBJS)
487493
$(CC) -shared $(LDFLAGS) -o $@ $< hts.dll.a $(LIBS)
488494

489495

490-
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 $(hts_internal_h) $(htslib_khash_h)
496+
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 $(hts_internal_h) $(bgzf_internal_h) $(htslib_khash_h)
491497
errmod.o errmod.pico: errmod.c config.h $(htslib_hts_h) $(htslib_ksort_h) $(htslib_hts_os_h)
492498
kstring.o kstring.pico: kstring.c config.h $(htslib_kstring_h)
493-
header.o header.pico: header.c config.h $(textutils_internal_h) $(header_h)
499+
header.o header.pico: header.c config.h $(textutils_internal_h) $(header_h) $(htslib_bgzf_h) $(htslib_hfile_h) $(htslib_kseq_h)
494500
hfile.o hfile.pico: hfile.c config.h $(htslib_hfile_h) $(hfile_internal_h) $(htslib_kstring_h) $(hts_internal_h) $(htslib_khash_h)
495501
hfile_gcs.o hfile_gcs.pico: hfile_gcs.c config.h $(htslib_hts_h) $(htslib_kstring_h) $(hfile_internal_h)
496502
hfile_libcurl.o hfile_libcurl.pico: hfile_libcurl.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) $(htslib_khash_h)
497-
hfile_s3_write.o hfile_s3_write.pico: hfile_s3_write.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) $(htslib_khash_h)
498503
hfile_s3.o hfile_s3.pico: hfile_s3.c config.h $(hfile_internal_h) $(htslib_hts_h) $(htslib_kstring_h) $(hts_time_funcs_h)
499504
hts.o hts.pico: hts.c config.h os/lzma_stub.h $(htslib_hts_h) $(htslib_bgzf_h) $(cram_h) $(htslib_hfile_h) $(htslib_hts_endian_h) version.h config_vars.h $(hts_internal_h) $(hfile_internal_h) $(sam_internal_h) $(htslib_hts_expr_h) $(htslib_hts_os_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_ksort_h) $(htslib_tbx_h) $(htscodecs_htscodecs_h)
500505
hts_expr.o hts_expr.pico: hts_expr.c config.h $(htslib_hts_expr_h) $(htslib_hts_log_h) $(textutils_internal_h)
501506
hts_os.o hts_os.pico: hts_os.c config.h $(htslib_hts_defs_h) os/rand.c
502-
vcf.o vcf.pico: vcf.c config.h $(fuzz_settings_h) $(htslib_vcf_h) $(htslib_bgzf_h) $(htslib_tbx_h) $(htslib_hfile_h) $(hts_internal_h) $(htslib_khash_str2int_h) $(htslib_kstring_h) $(htslib_sam_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_hts_endian_h)
507+
vcf.o vcf.pico: vcf.c config.h $(fuzz_settings_h) $(htslib_vcf_h) $(htslib_bgzf_h) $(htslib_tbx_h) $(htslib_hfile_h) $(hts_internal_h) $(htslib_khash_str2int_h) $(htslib_kstring_h) $(htslib_sam_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_hts_endian_h) $(bgzf_internal_h)
503508
sam.o sam.pico: sam.c config.h $(fuzz_settings_h) $(htslib_hts_defs_h) $(htslib_sam_h) $(htslib_bgzf_h) $(cram_h) $(hts_internal_h) $(sam_internal_h) $(htslib_hfile_h) $(htslib_hts_endian_h) $(htslib_hts_expr_h) $(header_h) $(htslib_khash_h) $(htslib_kseq_h) $(htslib_kstring_h)
504509
sam_mods.o sam_mods.pico: sam_mods.c config.h $(htslib_sam_h) $(textutils_internal_h)
505510
simd.o simd.pico: simd.c config.h $(htslib_sam_h) $(sam_internal_h)
@@ -520,7 +525,7 @@ realn.o realn.pico: realn.c config.h $(htslib_hts_h) $(htslib_sam_h)
520525
textutils.o textutils.pico: textutils.c config.h $(htslib_hfile_h) $(htslib_kstring_h) $(htslib_sam_h) $(hts_internal_h)
521526

522527
cram/cram_codecs.o cram/cram_codecs.pico: cram/cram_codecs.c config.h $(fuzz_settings_h) $(htslib_hts_endian_h) $(htscodecs_varint_h) $(htscodecs_pack_h) $(htscodecs_rle_h) $(cram_h)
523-
cram/cram_decode.o cram/cram_decode.pico: cram/cram_decode.c config.h $(cram_h) $(cram_os_h) $(htslib_hts_h)
528+
cram/cram_decode.o cram/cram_decode.pico: cram/cram_decode.c config.h $(cram_h) $(cram_os_h) $(htslib_hts_h) $(htslib_hfile_h)
524529
cram/cram_encode.o cram/cram_encode.pico: cram/cram_encode.c config.h $(cram_h) $(cram_os_h) $(sam_internal_h) $(htslib_hts_h) $(htslib_hts_endian_h) $(textutils_internal_h)
525530
cram/cram_external.o cram/cram_external.pico: cram/cram_external.c config.h $(htscodecs_rANS_static4x16_h) $(htslib_hfile_h) $(cram_h)
526531
cram/cram_index.o cram/cram_index.pico: cram/cram_index.c config.h $(htslib_bgzf_h) $(htslib_hfile_h) $(hts_internal_h) $(cram_h) $(cram_os_h)
@@ -699,6 +704,7 @@ check test: all $(HTSCODECS_TEST_TARGETS)
699704
cd test/mpileup && ./test-pileup.sh mpileup.tst
700705
cd test/fastq && ./test-fastq.sh
701706
cd test/base_mods && ./base-mods.sh base-mods.tst
707+
cd test/tlen && ./tlen.sh tlen.tst
702708
REF_PATH=: test/sam test/ce.fa test/faidx/faidx.fa test/faidx/fastqs.fq
703709
test/test-regidx
704710
cd test && \
@@ -872,7 +878,7 @@ test/test_time_funcs.o: test/test_time_funcs.c config.h $(hts_time_funcs_h)
872878
test/test_view.o: test/test_view.c config.h $(cram_h) $(htslib_sam_h) $(htslib_vcf_h) $(htslib_hts_log_h)
873879
test/test_faidx.o: test/test_faidx.c config.h $(htslib_faidx_h)
874880
test/test_index.o: test/test_index.c config.h $(htslib_sam_h) $(htslib_vcf_h)
875-
test/test-vcf-api.o: test/test-vcf-api.c config.h $(htslib_hts_h) $(htslib_vcf_h) $(htslib_kstring_h) $(htslib_kseq_h)
881+
test/test-vcf-api.o: test/test-vcf-api.c config.h $(htslib_hts_h) $(htslib_vcf_h) $(htslib_vcfutils_h) $(htslib_kbitset_h) $(htslib_kstring_h) $(htslib_kseq_h)
876882
test/test-vcf-sweep.o: test/test-vcf-sweep.c config.h $(htslib_vcf_sweep_h)
877883
test/test-bcf-sr.o: test/test-bcf-sr.c config.h $(htslib_hts_defs_h) $(htslib_synced_bcf_reader_h) $(htslib_hts_h) $(htslib_vcf_h)
878884
test/test-bcf-translate.o: test/test-bcf-translate.c config.h $(htslib_vcf_h)
@@ -946,7 +952,7 @@ $(srcprefix)htslib.map: libhts.so
946952
echo "Refusing to update $@ - HTSlib version not changed" 1>&2 ; \
947953
exit 1 ; \
948954
fi && \
949-
nm --with-symbol-versions -D -g libhts.so | awk '$$2 ~ /^[DGRT]$$/ && $$3 ~ /@@Base$$/ && $$3 !~ /^(_init|_fini|_edata)@@/ { sub(/@@Base$$/, ";", $$3); print " " $$3 }' > $@.tmp && \
955+
nm --defined-only --with-symbol-versions -D -g libhts.so | awk '$$2 ~ /^[DGRT]$$/ && ($$3 ~ /@@Base$$/ || $$3 !~ /@/) && $$3 !~ /^(_init|_fini|_edata)(@|$$)/ { sub(/@@Base$$/, "", $$3); print " " $$3 ";" }' > $@.tmp && \
950956
if [ -s $@.tmp ] ; then \
951957
cat $@ > $@.new.tmp && \
952958
printf '\n%s {\n' "HTSLIB_$$curr_vers" >> $@.new.tmp && \

NEWS

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,126 @@
1+
Noteworthy changes in release 1.23 (16th December 2025)
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Updates
5+
-------
6+
7+
* HTSlib 1.22 changed the VCF reader so that it stored GT prefixed phasing
8+
information, but only for files specifying `fileformat=VCFv4.4` or higher.
9+
This caused problems when merging files with different versions, so the
10+
VCF reader will now store prefixed phasing information irrespective of
11+
the VCF version listed in the file headers. For files up to VCFv4.3, the
12+
first phasing bit will be set if all other alleles are phased, and cleared
13+
otherwise (following the rules for VCFv4.4 onwards where no explicit
14+
phasing symbol is present). This will also happen when reading BCF.
15+
16+
When accessing GT data, it is no longer safe to assume that the phasing
17+
is set to zero even if the file reports a version earlier than VCFv4.4.
18+
Interfaces such as `bcf_gt_allele()` should always be used to access
19+
GT allele data.
20+
21+
For compatibility, prefixed phasing will be stripped when writing VCF
22+
files with version 4.3 or earlier.
23+
(PR #1938, fixes #1932)
24+
25+
* Add support for VCFv4.4 / VCFv4.5 "Number=" fields.
26+
(PR #1874)
27+
28+
* Consolidate and simplify SAM header parsing. This considerably speeds up
29+
parsing files with many SQ lines.
30+
(PR #1947. PR #1953 fixes oss-fuzz issues 444492071, 444492076, 444547724,
31+
444490034, PR #1977)
32+
33+
* Switch from strtol to hts_str2uint in mod parsing for speed increase.
34+
(PR #1957. Thanks to Chris Wright)
35+
36+
* Add UMI support to FASTQ input and output. See samtools/samtools#2270.
37+
(PR #1960, fixes samtools/samtools#2259. Requested by Poshi)
38+
39+
* Removed direct access to htsFile struct members in some sample functions.
40+
(PR #1963, fixes #1961. Reported by John Marshall)
41+
42+
* Improved operation of filters that work with header data. Filter expressions
43+
set as an `HTS_OPT_FILTER` on a BAM or CRAM iterator failed to return
44+
records matching on `rname`, `mrname`, `rnext` or `library`.
45+
(PR #1959)
46+
47+
* Add Type to the INFO/FORMAT sanity check. This produces a warning on
48+
incorrect Type usage.
49+
(PR #1967, fixes #1937 and samtools/bcftools#2431.
50+
Reported by Jukka Matilainen)
51+
52+
* S3 reading code now reads in `chunks` to limit the amount of data read (and
53+
therefore egress costs) from the object store when doing a range request.
54+
Also this combines the reading, writing and authorisation code into a single
55+
file.
56+
(PR #1958, fixes #1670. Reported by Stephan Drukewitz)
57+
58+
Build Changes
59+
-------------
60+
61+
* Change optimisation for -fsanitize=address,undefined test build to counter
62+
slow build and high compiler memory use.
63+
(PR #1924)
64+
65+
* Fix compilation failure on MacOS X 10.9 (and likely other very old platforms).
66+
(PR #1945, fixes #1941. Reported by Ryan Carsten Schmidt)
67+
68+
* Fix htslib.map update due to recent change in nm behaviour.
69+
(PR #1975, fixes #1971. Reported by John Marshall).
70+
71+
* The htscodecs submodule is updated to v1.6.5.
72+
This includes a fix to the rANS encoder when running on x86-64
73+
hardware with some SIMD features disabled.
74+
(Fixes samtools/samtools#2256. Reported by Ran Fan)
75+
76+
Bug fixes
77+
---------
78+
79+
* Fix segfault on an empty valid MM tag.
80+
(PR #1939, fixes #1936. Reported by John Marshall)
81+
82+
* Fix bam_next_basemod + HTS_MOD_REPORT_UNCHECKED flag.
83+
(PR #1946, fixes #1943)
84+
85+
* For the VCF rlen calculation, only use SVLEN for DEL, DUP and CNV symbolic
86+
alleles. A bug is also fixed on big-endian platforms where INFO and FORMAT
87+
values were being accessed incorrectly.
88+
(PR #1942, fixes #1940)
89+
90+
* Correct TLEN assignment in CRAM decode. Also improve decoder when dealing
91+
with multiple secondary alignments. See also samtools/hts-specs#842.
92+
(PR #1951, fixes #1948. Reported by Matt Sexton)
93+
94+
* Make tabix skip comments (-c) wherever they occur, not just at the start of
95+
the file.
96+
(PR #1952, fixes #1950. Reported by Victor Negîrneac)
97+
98+
* Update htscodecs for better AVX2 / AVX512 runtime detection.
99+
(PR #1954, fixes samtools/samtools#2256. Reported by Ran Fan)
100+
101+
* Fix embed_ref=2 on SEQ * and MD:Z tag. The combination of no sequence and
102+
MD:Z with embed_ref=2 caused the slice extents to be miscalculated,
103+
causing invalid CRAM output to be written.
104+
(PR #1964, fixes samtools/samtools#2277. Reported by fo40225)
105+
106+
* Try to ensure CSI indexes are built with valid parameters. Adjusts the
107+
min_shift and n_lvls to cover the size of the genome. This may override the
108+
user setting of min_shift (with warning) if needed.
109+
(PR #1968, fixes #1966. Reported by Marc Sturm)
110+
111+
* Fix bug where multi-threaded CRAM iterators could drop long alignments
112+
starting significantly before, but overlapping, the region of interest.
113+
(PR #1973, fixes samtools/samtools#2285, Reported by Nick Owens)
114+
115+
Documentation updates
116+
---------------------
117+
118+
* Added support information and samtools email for security issues.
119+
(PR #1956)
120+
121+
* Fix spelling in function name in sam.h.
122+
(PR #1972. Thanks to Jack Turpitt)
123+
1124
Noteworthy changes in release 1.22.1 (14th July 2025)
2125
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3126

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ Please cite this paper when using HTSlib for your publications.
6161
eprint = {https://academic.oup.com/gigascience/article-pdf/10/2/giab007/36332285/giab007.pdf},
6262
}
6363
```
64+
65+
### Support
66+
67+
If you have found a bug or would like a new feature, please report the same in the GitHub [HTSlib](https://github.com/samtools/htslib/issues) issue tracker.
68+
69+
For any security related issue, please send a mail to [[email protected]](mailto:[email protected]) instead of reporting in the GitHub issue tracker.

annot-tsv.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'\" t
2-
.TH annot-tsv 1 "14 July 2025" "htslib-1.22.1" "Bioinformatics tools"
2+
.TH annot-tsv 1 "16 December 2025" "htslib-1.23" "Bioinformatics tools"
33
.\"
44
.\" Copyright (C) 2015, 2017-2018, 2023-2024 Genome Research Ltd.
55
.\"

0 commit comments

Comments
 (0)