Hi Kevin,
Thank you so much for your helpful response. First, I normalized vcf file by bcftools norm –m-any and tried your command on the very small vcf file containing just 3 samples and found a strange thing. One of rows in my vcf file is:
20 1110696 rs6040355 A G,T 67 PASS NS=2;DP=10;AF=0.333,0.667;AA=T;DB GT:GQ:DP:HQ 1|2:21:6:23,27 2|1:2:0:18,2 2/2:35:4
Your suggested command calculated the hetero and homo count as: H
R POS ID REF ALT AltHetCount AltHomCount RefHomCount
20 1110696 rs6040355 A G 2 0 1
20 1110696 rs6040355 A T 2 1 0
As it is obvious, there is 2 AltHet and 1 AltHom, but based on the above output of the command, 1 genotype was considered as RefHom, which is not correct. Could you please kindly tell me how we can interpret this issue?
For obtaining AF and MAF from vcf file, I tried several ways, but none of them useful. I’m so grateful if you have any command /tool to calculate AF and MAF, please kindly share with me.
Thanks in advance