This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How does PLINK --recode12 code SNPs from ACTG to 1 and 2 in .ped files?

I used PLINK --recode12 to transfer my ACTG ped file to 1 2 ped file. But I don't know how PLINK did this recoding, specifically, when should a SNP like A A transferred to 1 1 or 2 2, and also how are the heterozygous ones like A T are coded.

Any help is really appreciated!!

snp genome

2 answers

Usually the minor allele is coded as 1 and the major allele is coded as 2.

Thank you chrchang523 !

--reference-allele and --recode12 together will be helpful to understand the recoding. Here reference allele will be recoded to 1, the alternative will be 2

plink --bfile input --reference-allele MyReferenceAllele.txt --recode12 --out output

In addition, --reference-allele and --recodeA together will generate additive data for further analysis with R

plink --bfile input  --reference-allele MyReferenceAllele.txt --recodeA --out output

Log in to answer this question.