samtools / htsjdk

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

Add VCF 4.3 writing support #1539

Closed andersleung closed 3 years ago

andersleung commented 3 years ago

@lbergelson

Description

Please explain the changes you made here. Explain the motivation for making this change. What existing problem does the pull request solve?

Things to think about before submitting:

lbergelson commented 3 years ago

@cmnbroad This PR is relevant to the headerline refactor.

cmnbroad commented 3 years ago

@andersleung I won't have time to review this until next week, but I took a quick look and one suggestion would be to integrate VCFPercentEncoder and it's tests into the existing VCFPercentEncodedTextTransformer and test classes. The VCFTextTransformer interface will have to be extended to have encode methods to do this, but since the encoder and decoder are complementary, the code, and tests, should live together. Also then the test cases won't have to be duplicated, and the tests can use composition to verify that encode and decode are inverses, i.e., decode(encode(a)) == a.