I want to update the FILTER column of a VCF
Although the old FILTER column has one filter flag per row, the new FILTER column will have some rows with multiple filter flag values delimited by semicolon
ie:
FILTER
QCFLAG1
QCFLAG2
QCFLAG1;QCFLAG2
when I run bcftools annotate -a my_annot_file.txt -c CHROM,POS,FILTER my_vcf.vcf
I get error:
The FILTER is not defined in the header: QCFLAG1;QCFLAG2
I think the problem is that while QCFLAG1
and QCFLAG2
are defined separately in the header, bcftools thinks QCFLAG1;QCFLAG2
is one filter that should be defined in the header.
I tried the --force
flag but get same error.
I know I can do this manually with UNIX utilities, but I am hoping there is an easier high level way with some vcf parsing tool. Any suggestions? Thank you.