1
$\begingroup$

Order of alleles in genotype field (on VCFs) can be used to infer haplotypes

However, what about unphased genotypes? I have a VCF file where I only have unphased genotypes:

0/1
1/0
1/1
1/2
2/1

However, I have, for example, both 0/1 and 1/0. Does the order of alleles have some different meaning with unphased genotypes, or genotypes with same alleles (e.g., 0/1 and 1/0) can be considered synonymous?

$\endgroup$
1
  • 1
    $\begingroup$ The fact that they are unphased necessarily means there is no order to them. However, the convention is usually to place the smaller value first, like 0/1 or 1/2 etc. But in reality it doesn't matter. $\endgroup$
    – user438383
    Oct 5, 2021 at 7:36

1 Answer 1

3
$\begingroup$

In the case of unphased VCF 0/1 and 1/0 are exactly equivalent and the order has no meaning.

Throughout the VCF specification, it is always encouraged to use numerical precedence in order to order the genotypes, e.g. 0/0, 0/1, 1/1 would be the preferred representations for diploid bi-allelic genotypes.

However it is not strictly enforced in the VCF specification as for now and you could have 1/0, 2/0, etc, and bcftools will not complain parsing them. The presence of two representation in the same VCF might indicate that the data comes from multiple variant callers or has been through manual editing, since for example variant callers will always use one representation only (numerical precedence usually)

Also, the order does impact how you read some of the sample information fields, for example the AD (allelic depth), for which the values are read following the order present in the GT field.

I had a look at the VCF 4.2 and 4.3 spec, but indeed is not so precise there on these details.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.