Skip to content

Commit 56cec01

Browse files
committed
Release 1.16.0
1 parent 146a8fe commit 56cec01

4 files changed

Lines changed: 148 additions & 63 deletions

File tree

CHANGES

Lines changed: 126 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
Version 1.16.0
2-
--------------
1+
Version 1.16.0 (6th May 2026)
2+
==============
33

4-
This release is not ABI compatible with 1.15.x, and loses some API
5-
compatibility too. All BAM and CRAM I/O is now performed via htslib,
6-
which is a newly added dependency. This change was made due to recent
7-
CRAM security fixes in htslib and the desire to no longer support two
8-
independent CRAM implementations. However with this comes a loss of
9-
some functionality.
4+
INCOMPATIBILITY: this release is *not ABI compatible* with 1.15.x, and
5+
loses some API compatibility too. All BAM and CRAM I/O is now
6+
performed via htslib, which is a newly added dependency. This change
7+
was made due to recent CRAM security fixes in htslib and the desire to
8+
no longer support two independent CRAM implementations. However with
9+
this comes a loss of some functionality.
1010

1111
For SAM, BAM and CRAM support we would encourage developers to upgrade to
1212
using htslib natively as this is the package with significantly better
1313
support and is better tested.
1414

15-
API visible changes:
15+
API visible changes
16+
-------------------
1617

1718
* io_lib/cram_bambam.[ch] and the CRAM_IO_CUSTOM_BUFFERING definitions have
1819
been removed. This means the libmaus2 / biobambam2 API has been removed.
@@ -31,12 +32,12 @@ API visible changes:
3132
* The Thread pool has been removed. Htslib's thread pool was derived from
3233
io_lib's so most of the same functionality is present. However some
3334
function names differ. Io_lib's thread_pool.h provides #defines to rename
34-
these functions, so the function API is mostly still be valid albeit
35+
these functions, so the function API is mostly still valid albeit
3536
without the ability to take their function pointers. Other exceptions
3637
include:
3738

3839
- Thread pool "queues" are now htslib "process"es.
39-
The old t_results_queue_init took now arguments, however the htslib
40+
The old t_results_queue_init took no arguments, however the htslib
4041
equivalent function hts_tpool_process_init takes 3.
4142

4243
- The old t_pool_flush took a thread pool, while hts_tpool_process_flush
@@ -48,7 +49,7 @@ API visible changes:
4849
* We used to be able to do cram_set_option(NULL,...) to change default
4950
opts without having a file handle. An example of this is CRAM_OPT_VERSION
5051
to set the output version before opening the file.
51-
This is not permitted in htslib and thus the new io_lib.
52+
This is not permitted in htslib and thus nor in io_lib.
5253

5354
* CRAM_OPT_DECODE_MD defaults to -1 in htslib, and 0 in old io_lib.
5455
Scramble overrides this itself, but if calling the API you will need to be
@@ -74,7 +75,8 @@ API visible changes:
7475
https://github.com/samtools/htslib/.
7576

7677

77-
Internal changes:
78+
Internal changes
79+
----------------
7880

7981
* While htslib's header API was derived from the original API in io_lib, it
8082
does not expose all of the functions that io_lib did. This means we have
@@ -85,7 +87,7 @@ Internal changes:
8587
* The default CRAM version is now 3.1, in line with htslib's version change.
8688

8789
* Io_lib's bam_seq_t structure has a different memory layout to htslib's
88-
bam1_t. Specifically there in io_lib there is no "core" sub-structure and
90+
bam1_t. Specifically in io_lib there is no "core" sub-structure and
8991
the entire BAM record is held in a single allocated memory block rather
9092
than the two components (fixed and variable) allocated by htslib. We
9193
transparently switch between the two when calling htslib, but this comes
@@ -94,15 +96,11 @@ Internal changes:
9496
this for some file formats.
9597

9698

97-
Benchmarks:
99+
Benchmarks
100+
----------
98101

99102
Some benchmarks on 10 million NovaSeq alignments follow. Values are
100103
real (elapsed), user CPU and system CPU times in seconds.
101-
Conversions to uncompressed BAM (BAMu) are demonstrative of read-only
102-
times, while BAM to ??? format conversions are indicative of write times
103-
(given a fixed cost of decoding the input BAM which can be deduced from
104-
BAM->BAMu).
105-
106104

107105
Reading:
108106
0 threads
@@ -117,13 +115,13 @@ Reading:
117115
scramble-1.15.1 2.09 1.65 0.49 0.43 4.85 0.09 1.38 7.94 10.28
118116
scramble-hts 0.61 2.84 0.59 0.56 4.36 0.46 1.42 6.80 3.39
119117

120-
This release represents a significant slow down in io_lib's single
121-
threaded SAM and CRAM decoding and a minor slow down in BAM decoding.
122-
The slow downs are most likely down to the change in bam1_t memory layout
118+
This release represents a slow down in io_lib's single threaded SAM
119+
and CRAM decoding and a minor slow down in BAM decoding. The slow
120+
downs are most likely down to the change in bam1_t memory layout
123121
incurred by htslib.
124122

125123
However with with many threads, this is a smaller slow down in BAM and
126-
CRAM and a very significant speed increase to SAM which previously didn't
124+
CRAM and a significant speed increase to SAM which previously didn't
127125
have a multi-threaded decoder.
128126

129127

@@ -145,6 +143,110 @@ variable in the reading tests), SAM and BAM writing are broadly comparable
145143
to before (using libdeflate) while CRAM writing is significantly faster.
146144

147145

146+
External function names removed
147+
-------------------------------
148+
149+
Note: most of these should have been declared as static and were
150+
never intended for public use.
151+
152+
There are many more functions which are absent from this library but
153+
are now inherited via htslib. However we have not validated the API
154+
is the same, so the functionality will exist but the code may still
155+
needing changing.
156+
157+
BAM:
158+
bam_close
159+
bam_copy
160+
bam_get_seq
161+
bam_next_seq
162+
bam_open
163+
bam_open_block
164+
bam_put_seq
165+
bam_set_option
166+
bam_set_voption
167+
bam_write_header
168+
bgzf_decode_thread
169+
bgzf_encode_thread
170+
171+
CRAM:
172+
add_read_names
173+
cram_allocate_encoder
174+
cram_block_method2str
175+
cram_deallocate_encoder
176+
cram_decode_TD
177+
cram_default_version
178+
cram_dependent_data_series
179+
cram_encoder_get_fd
180+
cram_enque_compression_block
181+
cram_index_load_via_callbacks
182+
cram_init_varint
183+
cram_io_allocate_output_buffer
184+
cram_io_close
185+
cram_io_deallocate_output_buffer
186+
cram_io_flush_output_buffer
187+
cram_io_input_buffer_fgets
188+
cram_io_input_buffer_read
189+
cram_io_input_buffer_seek
190+
cram_io_input_buffer_underflow
191+
cram_io_open
192+
cram_io_open_by_callbacks
193+
cram_io_openw_by_callbacks
194+
cram_io_output_buffer_putc
195+
cram_io_output_buffer_write
196+
cram_mem_write_callback
197+
cram_nop_decode_reset
198+
cram_open_by_callbacks
199+
cram_openw_by_callbacks
200+
cram_process_work_package
201+
cram_stats_dump
202+
cram_stats_qual
203+
expand_cache_path
204+
expected_template_count
205+
generate_consensus
206+
int32_decode
207+
int32_encode
208+
int32_put
209+
itf8_size
210+
load_ref_portion
211+
lossy_read_names
212+
refs_load_fai
213+
safe_itf8_put
214+
safe_ltf8_put
215+
216+
Misc:
217+
mkdir_prefix
218+
paranoid_fclose
219+
scram_input_bam_block
220+
scram_open_cram_via_callbacks
221+
222+
Thread pool:
223+
t_pool_delete_result
224+
t_pool_destroy
225+
t_pool_dispatch
226+
t_pool_dispatch2
227+
t_pool_flush
228+
t_pool_init
229+
t_pool_next_result
230+
t_pool_next_result_wait
231+
t_pool_results_queue_empty
232+
t_pool_results_queue_len
233+
t_pool_results_queue_sz
234+
t_results_queue_destroy
235+
t_results_queue_init
236+
237+
New external functions added
238+
----------------------------
239+
240+
bam1_to_bam_seq
241+
bam_seq_to_bam1
242+
sam_hdr_convert
243+
sam_hdr_convert_to_htslib
244+
sam_hdr_nref
245+
sam_hdr_ref2len
246+
sam_hdr_ref2name
247+
248+
249+
148250
Version 1.15.1 (14th July 2025)
149251
--------------
150252

README.md

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Io_lib: Version 1.15.1
2-
=======================
1+
Io_lib
2+
======
33

44
Io_lib is a library of file reading and writing code to provide a general
55
purpose SAM/BAM/CRAM, trace file (and Experiment File) reading
@@ -41,15 +41,16 @@ been too time consuming. Note this does have some small API
4141
incompatibilities however.
4242

4343

44-
Version 1.16.0 (May 2026)
44+
Version 1.16.0 (6th May 2026)
4545
--------------
4646

47-
This release is not ABI compatible with 1.15.x, and loses some API
48-
compatibility too. All BAM and CRAM I/O is now performed via htslib,
49-
which is a newly added dependency. This change was made due to recent
50-
CRAM security fixes in htslib and the desire to no longer support two
51-
independent CRAM implementations. However with this comes a loss of
52-
some functionality. See CHANGES for full details.
47+
INCOMPATIBILITY: this release is not ABI compatible with 1.15.x, and
48+
loses some API compatibility too. All BAM and CRAM I/O is now
49+
performed via HTSlib, which is a newly added dependency. This change
50+
was made due to recent CRAM security fixes in htslib and the desire to
51+
no longer support two independent CRAM implementations. However with
52+
this comes a loss of some functionality. See CHANGES for full
53+
details.
5354

5455
Note to pass all the CRAM v4 tests this needs htslib 1.24 or above. It
5556
still works without this, except for the sign of insert sizes changing
@@ -246,11 +247,11 @@ files). The appropriate operating system package names and comands
246247
differ per system. On Debian Linux derived systems use the command
247248
below (or build and install your own copies from source):
248249

249-
sudo apt-get install make zlib1g-dev libbz2-dev liblzma-dev
250+
sudo apt-get install make zlib1g-dev libhts-dev libdeflate-dev
250251

251252
On RedHat derived systems the package names differ:
252253

253-
sudo yum install make zlib-devel bzip2-devel xz-devel
254+
sudo yum install make zlib-devel htslib-devel libdeflate-devel
254255

255256

256257
Zlib
@@ -287,10 +288,11 @@ with ./configure --disable-own-crc (or CFLAGS=-UIOLIB_CRC).
287288
Libdeflate
288289
----------
289290

290-
The BAM reading and writing also has optional support for the
291-
libdeflate library (https://github.com/ebiggers/libdeflate). This can
292-
be used instead of an optimised zlib (see above), and generally is
293-
slightly faster. Build using:
291+
Libdeflate is used by HTSlib's BAM reading and writing, but io_lib also
292+
optionally makes use of its CRC32 implementation.
293+
See https://github.com/ebiggers/libdeflate.
294+
295+
Build using:
294296

295297
./configure --with-libdeflate=/path
296298

@@ -391,25 +393,6 @@ with $DIST being pre-populated with already built and installed 3rd
391393
party dependencies, some from MSYS mentioned above.
392394

393395

394-
Libbsc
395-
------
396-
397-
This is experimental, just to see what we can get with a high quality
398-
compression engine in CRAM. It's hard to build right now, especially
399-
given it's a C++ library and our code is C. The hacky solution now
400-
is (linux) e.g.:
401-
402-
../configure \
403-
CPPFLAGS=-I$HOME/ftp/compression/libbsc \
404-
LDFLAGS="-L$HOME/ftp/compression/libbsc -fopenmp" \
405-
LIBS=-lstdc++
406-
407-
Enable it using scramble -J, but note this requires experimental CRAM
408-
versions 3.1 or 4.0.
409-
410-
** Neither of these should be used for production data. **
411-
412-
413396
MacOS X
414397
-------
415398

configure.ac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
AC_INIT(io_lib, 1.15.1)
2+
AC_INIT(io_lib, 1.16.0)
33
IOLIB_VERSION=$PACKAGE_VERSION
44
IOLIB_VERSION_MAJOR=`expr "$PACKAGE_VERSION" : '\([[0-9]]*\)'`
55
IOLIB_VERSION_MINOR=`expr "$PACKAGE_VERSION" : '[[0-9]]*\.\([[0-9]]*\)'`
@@ -59,9 +59,9 @@ AM_MAINTAINER_MODE
5959
# libstaden-read.so.1 -> libstaden-read.so.1.1.0
6060
# libstaden-read.so.1.1.0
6161

62-
VERS_CURRENT=15
63-
VERS_REVISION=4
64-
VERS_AGE=1
62+
VERS_CURRENT=16
63+
VERS_REVISION=0
64+
VERS_AGE=0
6565
AC_SUBST(VERS_CURRENT)
6666
AC_SUBST(VERS_REVISION)
6767
AC_SUBST(VERS_AGE)

progs/scramble.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int filter_tags(bam_seq_t *s, char *aux_filter, int keep) {
185185

186186
static void usage(FILE *fp) {
187187
fprintf(fp, " -=- sCRAMble -=- version %s\n", IOLIB_VERSION);
188-
fprintf(fp, "Author: James Bonfield, Wellcome Trust Sanger Institute. 2013-2023\n\n");
188+
fprintf(fp, "Author: James Bonfield, Wellcome Trust Sanger Institute. 2013-2026\n\n");
189189

190190
fprintf(fp, "Usage: scramble [options] [input_file [output_file]]\n");
191191

0 commit comments

Comments
 (0)