This is a test version of Biostars. For the public version, visit https://www.biostars.org.
AF column in VCF file

Hi , I'm new to genetics . I have a VCF file and for each sample I need to identify if it is heterozygous or homozygous. For example, if AF=0.5 is it herto or homo?

Thank you

vcf af heterozygous

1 answer

AF stands for "Allele frequency". 0.5 means heterozygous. Another way of checking the zygosity is the GT field, standing for genotype. There you will see things like 1/1 = Homozygous for the alternative allele (the variant); 0/1 = heterozygous; 0/0 = homozygous for the reference allele (no variant).

Than you for your answer . As I understand you can encode hetro as 1 and homozygous as 2 . And if the SNP is not present then the it is encoded as 0 .I was wondering if this genotype encoding is based on minor if major allele? Since I want to preform a SKAT test and I have to build a genotype matrix: numeric genotype matrix with each row as a different individual and each column as a separate gene/snp. Each genotype should be coded as 0, 1, 2, and 9 for AA, Aa, aa, and missing, where A is a major allele and a is a minor allele. So if I base my encoding on the AF field and say that 0.5 is hetro is it ok ?

Log in to answer this question.