I have always thought that 1/0
and 0/1
in VCF genotype fields are equivalent. And yet, GATK uses both. For example, these are two variants called in the same sample and the same run of GATK 4.1.4.0:
chr7 117120317 . ATTCATTGTTTTGAAAGAAAGATGGAAGAATGAACTGAAG A 748.97 . AC=1;AF=0.5;AN=2;DP=64;ExcessHet=3.0103;FS=0;MLEAC=1;MLEAF=0.5;MQ=60;QD=11.89;SOR=7.223 GT:AD:DP:GQ:PL:SB 1/0:0,36:63:99:2294,1042,933:0,0,0,36
chr7 117120306 . GACGCGCT G 516.6 . AC=1;AF=0.5;AN=2;BaseQRankSum=0.826;DP=70;ExcessHet=3.0103;FS=0;MLEAC=1;MLEAF=0.5;MQ=60;MQRankSum=0;QD=8.2;ReadPosRankSum=-5.786;SOR=0.976 GT:AD:DP:GQ:PL:SB 0/1:37,26:63:99:524,0,1203:0,20,0,26
And here are the same lines redacted for clarity:
chr7 117120317 . AT..AG A [...] GT:AD:DP:GQ:PL:SB 1/0:0,36:63:99:2294,1042,933:0,0,0,36
chr7 117120306 . GA..CT G [...] GT:AD:DP:GQ:PL:SB 0/1:37,26:63:99:524,0,1203:0,20,0,26
As you can see, one is genotyped as 1/0
and the other as 0/1
. The VCF specs say:
GT (String): Genotype, encoded as allele values separated by either of / or |. The allele values are 0 for the reference allele (what is in the REF field), 1 for the first allele listed in ALT, 2 for the second allele list in ALT and so on. For diploid calls examples could be 0/1, 1 | 0, or 1/2, etc. Haploid calls, e.g. on Y, male non-pseudoautosomal X, or mitochondrion, are indicated by having only one allele value. A triploid call might look like 0/0/1. If a call cannot be made for a sample at a given locus, ‘.’ must be specified for each missing allele in the GT field (for example ‘./.’ for a diploid genotype and ‘.’ for haploid genotype). The meanings of the separators are as follows (see the PS field below for more details on incorporating phasing information into the genotypes):
- / : genotype unphased
- | : genotype phased
This suggests that although 1|0
is not the same as 0|1
, the unphased 0/1
and 1/0
genotypes are completely equivalent. Which makes perfect sense given that the N/N
genotypes are unphased, so n/N
must be equivalent to N/n
.
So, my questions are: why does gatk produce some lines with 0/1
and others with 1/0
? Is it a bug? Am I missing something? I can't imagine a developer writing code to pick either 0/1
or 1/0
randomly, so presumably they indicate some difference in what gatk sees about a variant. So are 0/1
and 1/0
not 100% equivalent somehow?
I have seen How is the GT field in a VCF file defined? which suggests the two are equivalent, but this seems to be contradicted by GATK's own output which is why I am asking this again to get a clear and preferably referenced answer.