jamescasbon/PyVCF — pull request #88 by bow (2013-01-29 01:09:22+00:00)
Title: Patch for Writer so it keeps non-GT data when writing records without GT data.

Some programs (e.g. bcftools) may output [VCF files whose samples do not have any
GT field value](https://github.com/bow/PyVCF/blob/patch_writer-no-gt-field/vcf/test/nogt.vcf). When dealing with files like these, PyVCF's writer
(previously) removes all non-GT data and replace it with `'./.'` since the
`_format_sample` function [immediately returns upon failing to find GT data](https://github.com/jamescasbon/PyVCF/blob/53548b6a73220e328cb0d891ad25ecf0f1eab4d0/vcf/parser.py#L622).

This fix addresses the issue, so that the Writer keeps any non-GT data intact.

I've added a test case for this type of file as well, so we can test for this behavior in the future. However, I've also noted that without the code change the file still pass the test (albeit having its `PL` data replaced with `./.`). So I tweaked `_Call.__eq__` making it compare the `data` attributes when doing the equality testing.

My setup is Arch Linux 64-bit running Python 2.7.3 and all tests pass.