bcftools error when re-annotating the FILTER column of a VCF when multiple ";" delimited FILTER values exist
0
0
Entering edit mode
5.0 years ago
curious ▴ 820

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.

vcf vcftools bcftools • 877 views
ADD COMMENT

Login before adding your answer.

Traffic: 2067 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6