Open noporpoise opened 9 years ago
I think the problem here is that:
Therefore there's nothing that tells the API that record v, is setup to correspond to the new changed header. I am considering writing a function bcf_translate_hdr with arguments old_hdr, new_hdr, and record to do the translation from old header to new header. Will that do for you?
That sounds like it would be very useful. What is the correct way to add a sample to a VCF and print it out currently? Should I be editing the input header and not using an output header?
When adding a new sample to a VCF, format fields for the new sample seem to take on undefined values rather than the "missing" value. What is the best way to set all format fields to missing for a new sample?
I'm adding a sample and format field to a VCF with the following code:
Input VCF:
Output VCF which seems to have weird values in the pre-existing format field
HI
forNewSample
:I can't see any easy way to set all format fields to missing value for a new sample. Is there a simple way? It seems the fastest way would be from within htslib. A function in
vcf.h
would be useful, I can have a go at writing one if it's needed.