samtools / htsjdk

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

Merging VCFHeaders can result in incorrectly ordered contig lines #1574

Open cmnbroad opened 2 years ago

cmnbroad commented 2 years ago

One case that fails to produce correct output is when merging headers where one header has a dictionary that is a subset of the other. Given two headers, one header with contigs "1" through "22" and one with contigs "20" and "21":

Though I suspect these results depend on the order in which the headers are merged.

See https://github.com/samtools/htsjdk/issues/1573, which is the root cause of much of this.