I want to filter a multi sample vcf based on Allele Balance (AB) value of heterozygous calls only. The purpose is to keep those variants which have AB value between 0.25 and 0.75 and are heterozygous. In addition, homozygous calls will also be kept in vcf, and no filtering needs to be done for those variants based on any tag.
I don't know how can I filter VCF based on above-mentioned criteria.
For the sake of brevity, I just posted an example line from my input VCF.
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Sample1 Sample2 > chr1 87083 . G T 69.7403 . AB=0.235294;ABP=13.3567;AC=1; GT:DP:RO:QR:AO:QA:GL 0/0:16:16:582:0:0:0,-4.81648,-52.7438 0/0:26:26:953:0:0:0,-7.82678,-86.1365
I'll be thankful for any help in this regard.