bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

Bcftools error -filtering error: the tag "\" is not defined in the VCF header

Open desmodus1984 opened this issue 3 years ago • 1 comments

Hi,

I have genotyped a group of samples and then I used bcftools to exclude one which had a lot of missing data. I used the following code to do this: bcftools view --threads 48 -S samples.txt 18-diss.vcf.gz -O z -o Wo_PA90.18-diss.vcf.gz

Then, I wanted to follow up with vcf filtering and bcftools had an error: tbx_index_build failed: 18-diss.No-PA90.vcf.gz

so then I indexed my file with tabix -p vcf No-PA90.vcf.gz

and then when I tried doing the filtering - which worked the first time after doing GATK genotypegvcf- I got the error. [filter.c:2046 filters_init1] Error: the tag "" is not defined in the VCF header My filtering code was: bcftools filter --threads 48 -e 'FS>40.0 || SOR>3 || MQ<40 || MQRankSum<-5.0 || MQRankSum>5.0 || QD<2.0
|| ReadPosRankSum<-4.0' Wo_PA90.18-diss.vcf.gz --SnpGap 5 -O z Wo_PA90.filt-1.vcf.gz

So, there was a problem during the exclusion of the sample, which then propagated somehow.

I would appreciate what should I do to fix it.

Best regards;

desmodus1984 avatar Jun 07 '22 21:06 desmodus1984

It seems there is something wrong with the VCF itself. What version of bcftools are you using? Please try with the latest as that could give you a more informative error message. (See here how to compile from scratch http://samtools.github.io/bcftools/howtos/install.html)

If that does not help, a small test case to reproduce the problem will be needed.

pd3 avatar Jun 21 '22 08:06 pd3