Q: Why do we have VCFHeader, but not SAMHeader?
A: Most (all)? of the SAM (bam1_t) manipulation functions do not require a ptr to the header,
whereas almost all of the VCF (bcf1_t) manipulation functions do. Therefore, we track bcf_hdr_t*
inside each VCFRecord; this is wrapped by VCFHeader for future convenience (for example,
now we have @property nsamples; may move the tag reader and writer functions here?)
In order to avoid double free()'ing an instance bcf_hdr_t,
this wrapper will be the authoritative holder of of bcf_hdr_t ptrs,
it shall be passed around by reference, and copies are disabled.
Wrapper around bcf_hdr_t
Q: Why do we have VCFHeader, but not SAMHeader? A: Most (all)? of the SAM (bam1_t) manipulation functions do not require a ptr to the header, whereas almost all of the VCF (bcf1_t) manipulation functions do. Therefore, we track bcf_hdr_t* inside each VCFRecord; this is wrapped by VCFHeader for future convenience (for example, now we have @property nsamples; may move the tag reader and writer functions here?)
In order to avoid double free()'ing an instance bcf_hdr_t, this wrapper will be the authoritative holder of of bcf_hdr_t ptrs, it shall be passed around by reference, and copies are disabled.