How is the GT field in a VCF file defined? As my question in SO was closed and asked to be posted in this forum, I am posting it here
I am not from the bioinformatics domain. However, for the sake of analysis, I am trying to pick up certain basics related to the GT field in the VCF file.
I know we have a field called Alleles. May I know under what circumstances GT takes a certain values and how they are called? Can you confirm my understanding?
Ref Alt    GT   Name 
A    A     0/0  Homozygous
A    G     0/1  Heterozygous (does 1/0 also mean the same?) What's this 0 and 1 actually?
A   [C,CA] ??    ??
??   ??    1/1  HOM_ALT? How and why? 

Can the experts here help me to fill the question marks and also help me understand with the Ref and Alt combinations when a genotype can take a value of 0/0 or 1/0 or 1/1 or 1/2 etc and what are the names for those values? Like when it is called home_alt etc
Any simple explanation for beginner like me (with no background in bioinformatics/biology) can be helpful
0 and 1 is just a way of coding the reference (0) and alternate (1) allele. These could be A/G, C/T etc. It's just a simplified way of expressing the different alleles.
0/1 and 1/0 functionally mean the same thing (that the individual is a heterozygote) - since the genotype is unphased, the alleles aren't ordered. The / symbol tells you the genotype is unphased. However, in practice, a heterozygous genotype is always written as 0/1 as a matter of convention. 0/0 is referred to as homozygous reference, and 1/1 as homozygous alternative.
0|1 and 1|0 do mean something different, since the pipe symbol | tell us the order of the alleles matters.
Occasionally you will have multi allelic positions, where you have more than one alternate allele, and therefore the field will look like:
Ref   Alt
A   [C,GT]

The extra alt allele is given the number 2, so in this case if an individual had the genotype CT then their genotype code would be 0/2.
Full detail is given in the official VCF specification page.