Hello,
I have a VCF file containing SNP data from 100 individuals. I followed the GATK
best practices with necessary filtering options. I want to perform another filtration based on Allele-balance. So, I used the following code for doing that:
bcftools view -i 'AB > 0.25 && AB < 0.75 | AB < 0.01' only_SNPs_filter_removed_maxmiss_0.5.recode_dustmasked_header.vcf > AB.vcf
But it throws an error message stating that the AB
tag is not found in the VCF header. I think unless specified, GATK
does not produce that in the output VCF file. I also used Vcflib
to do so but there I received another error message stating
cannot compare (>) objects of dissimilar types
3 4
Can you please suggest how to perform that AB filtering on my current VCF file? Thank you.
what INFO and FORMAT are present in your VCF ?
Here are the INFO in the VCF header
Have you tried
vcffilter
?Also, if the issue is that the AB header is missing in the VCF, maybe you could add it manually yourself and see if it works?
Yes, I tried VCFfilter and then I got the above error. I posted it.
Hi, I manually added the AB header in the VCF file and then the
vcffilter
ran successfully. But using the above parameters the number of SNPs did not change after filtering for AB.