Plink ped format
1
2
Entering edit mode
2.1 years ago
gubrins ▴ 290

Heys,

I was trying to convert a vcf to a ped file format. However, when my samples had a genotype 0/0, it did not appear as 0 in my ped file. I am just obtaining 1 or 2 and the 0 are missing. This is the code I am using:

plink --bfile leopard1 --recode12 --out leopard1 --allow-extra-chr

I am using Plink v1.9

Thanks in advance!

Plink • 658 views
ADD COMMENT
2
Entering edit mode
2.1 years ago
caleb_dume ▴ 60

You included the flag --recode12. The plink doc says --recode12 "will recode the alleles as 1 and 2 (and the missing genotype will always be 0)." Missing genotypes generally appear as ./. in a vcf and they would be coded as 0 0 (missing) in the ped file with the --recode12 flag. 0/0 would not appear as 0's in the ped file with the flags you included. Might recommend you check out the plink documentation for more on the recode flag.

ADD COMMENT
0
Entering edit mode

I don't understand because for another dataset it worked. Anyway, I found this script that does it, just in case anybody in the future needs it:

https://github.com/bodkan/vcf2eigenstrat/blob/master/conversion.sh

Thanks @caleb_dume !

ADD REPLY

Login before adding your answer.

Traffic: 1193 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6