Skip to content

Renable changing CRAM compression level via hts_set_opt.#1203

Merged
daviesrob merged 1 commit intosamtools:developfrom
jkbonfield:cram_compression_level
Jan 18, 2021
Merged

Renable changing CRAM compression level via hts_set_opt.#1203
daviesrob merged 1 commit intosamtools:developfrom
jkbonfield:cram_compression_level

Conversation

@jkbonfield
Copy link
Copy Markdown
Contributor

This bug was introduced during #1181 where the additional
HTS_OPT_FILTER meant the automatic fall-through from
HTS_OPT_COMPRESSION_LEVEL no longer applied.

I decided against continuing the previous obscurity of moving
HTS_OPT_COMPRESSION_LEVEL to the end of the switch and having no
return (thus falling into the cram_set_voption call), instead
favouring an explicit call.

An example command that demonstrated the problem was:

samtools view -O cram,level=1 in.bam -o out.cram

This bug was introduced during samtools#1181 where the additional
HTS_OPT_FILTER meant the automatic fall-through from
HTS_OPT_COMPRESSION_LEVEL no longer applied.

I decided against continuing the previous obscurity of moving
HTS_OPT_COMPRESSION_LEVEL to the end of the switch and having no
return (thus falling into the cram_set_voption call), instead
favouring an explicit call.

An example command that demonstrated the problem was:

    samtools view -O cram,level=1 in.bam -o out.cram
@daviesrob daviesrob merged commit 13fe974 into samtools:develop Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants