bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

update FILTER col with `annotate` when some variants have multiple flags delimited by ";"

Open brettva opened this issue 3 years ago • 1 comments

I am trying to update the FILTER col of a vcf, the possible problem is that some variants have multiple flags delimited with a semicolon

annotate.vcf.gz:

#CHROM  POS     ID      FILTER
1       1       rs1003590       UNMAPPED;HWE

the command I run: bcftools annotate -a annotate.vcf.gz -c CHROM,POS,ID,FILTER my_vcf.vcf.gz

gives warning the following warning before outputting an empty vcf:

:The FILTER is not defined in the header: UNMAPPED;HWE

even though my_vcf.vcf.gz has header with:

##FILTER=<ID=UNMAPPED,Description="Probe could not be found in genome">
##FILTER=<ID=HWE,Description="P(HWE) in European Samples < 0.0001">

Is it possible to update variants with multiple filter using annotate?

brettva avatar Apr 02 '21 20:04 brettva

Are these filters defined in the header of annotate.vcf.gz? And what version of bcftools are you running? I was not able to reproduce the problem with the latest version.

pd3 avatar Apr 12 '21 13:04 pd3