This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to represent genotypes of form 1|1

I have a VCF file and the genotypes look like

1|0     1|0     0|1     1|0     0|1     0|1     0|1 0|0

In my other file, I have genotypes like AA, AB and BB

I was wondering if I can represent them in an equivalent form.

1|0     1|0     1|1     1|0     0|1    0|0
AB      AB      AA      AB      BA     BB

Are both the same thing?

genome vcf

1 answer

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

Reference

Thanks!. I have SNP calls, so how can I convert them in genotypes such as AA, AB, and BB.

You can convert your genotype file into PED/MAP format by plink

For example

plink1.9 --vcf your.vcf --recode --out example

Thanks, it is not giving me anything like AA, AB, BB. It gives me two output files (.map, .ped), but not the information I am looking for. For example for SNP rs10001 G T, I would like to have something rs10001 G T, AB.

Log in to answer this question.