samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
278 stars 244 forks source link

Require sequence dictionary MD5s when writing CRAM. #1612

Open cmnbroad opened 2 years ago

cmnbroad commented 2 years ago

Fixes https://github.com/samtools/htsjdk/issues/506 (and by extension will also fix https://github.com/broadinstitute/gatk/issues/5195). If the SAM header used to create a CRAM doesn't have a sequence dictionary with MD5s, the code will attempt to use consult the reference's dictionary to inject them if possible. Otherwise, the write operation will fail with an error message.