Closed jkbonfield closed 2 months ago
The above fixes it for view, but the issue exists with most commands many of which do now have a compression level option. Eg bcftools sort
.
I have a PR incoming, but I think the correct solution is fixing set_wmode so it honours what is passed into it if it's compatible with the extension, and sets FT_BCF|FT_GZ
otherwise.
https://github.com/samtools/bcftools/commit/30dbc3c39ed92d3617fb0737ba533b1c97c3907e added code to override the requested format based on the filename suffix. Unfortunately
-Ob
and-Ou
now both operate the same as it claims bcf isFT_BCF | FT_GZ
.Hence this regressed between 1.11 and 1.12.
We can still keep the autodetection, but we also need to explicitly override clevel for -u so it's subsequently defined as level 0. Eg:
Note this is still subtly different. 1.11 onwards treated
-Ou
as a naked BCF with no gzip wrapper.-Ob -l0
however is BGZF wrapped with no-compression, but it does mean it has CRC checking. I think the former was not spec compliant anyway as BGZF is mandatory, so this regression could be considered to be a bug fix.