htslib
htslib copied to clipboard
Removing a symbolic allele from VCF header
I'm trying to remove the VCF header line for a symbolic alternate allele. Since ##ALT
header lines belong to a specific BCF_HL_* type, it seems like my only options are removing all ##ALT=
lines, or remove using the ID. Does this look right? Am I missing a more direct way?
bcf_hdr_append(hdr, "##ALT=<ID=DEL,Description=\"Deletion\">");
Remove all ##ALT=
lines:
bcf_hdr_remove(hdr, BCF_HL_GEN, "ALT");
Remove by matching to the ID.
bcf_hdr_remove(hdr, BCF_HL_STR, "DEL");
Currently working in VCFv4.1
Currently there is no other, more direct, API. The only other option would be to manipulate the hrec records directly.