cyvcf2
cyvcf2 copied to clipboard
Allow changing sample names
I'm filing this issue because despite the plethora of VCF reading/writing libraries for Python, no one of them implements this. (I filed a similar request for pysam).
I can probably implement this like:
vcf.set_sample_name(int index, char *newname)
Yes, that would work nicely.
actually, I just looked into this. The reason no htslib wrapper does it (including cyvcf2) is because it's hard. It would involve splicing out characters from the header text, updating the sample dictionary, etc.
I assume this is due how to htslib does things? (but in general this issue is not limited to htslib, no wrapper, including older stuff like PyVCF, does this, although for likely many different technical issues).