How to convert genotypes "1, 2" to "0,1, 2"?
1
0
Entering edit mode
2.8 years ago
Emy ▴ 50

Hi everyone,

I have genotypes with the codes of 1 and 2. For my aim, I must convert them to 0, 1, and 2. I found that plink can do it. So, I run them by plink with the use of the below codes.

shell("plink --file r --maf 0.05 --geno 0.01 --mind 0.1 --hwe 1e-6 --nonfounders --horse --recode --out rk")
3011 3011 2788 2327 1 1.4625 2 2 1 1 1 2 2 2 1 2 1 1 2 2 2 1 1 2 1 2 1 1 2 

shell("plink --file r --maf 0.05 --geno 0.01 --mind 0.1 --hwe 1e-6 --nonfounders --horse --recodeA --out rA")
3011    3011    2788    2327    1   1.4625  0   0   1   0   1   0   0   1   1   1   0   1   1   1   1   1   1   1   1   1

shell("plink --file r --maf 0.05 --geno 0.01 --mind 0.1 --hwe 1e-6 --nonfounders --horse --recodeAD --out rAD")
3011 3011 2788 2327 1 1.4625 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1

By the use of --recode, I only see 1 and 2 codes. For --recodeA and --recodeAD options, they generated codes 0, 1, 2. But when I compared the results of them, they are different in genomic regions.

How can I have accurately converted genotypes (0,1,2) from my data? Which option in plink is suitable for my work?

Thanks

snp plink • 1.5k views
ADD COMMENT
2
Entering edit mode
2.8 years ago

Using just --recodeA is the usual way to do this, as per: convert from plink format into 012 format



For "--recodeA" and "--recodeAD" options, they generated codes 0, 1, 2. But when I compared the results of them, they are different in genomic regions.

You should not directly compare the results of these - they produce different results. Please see:

Or, please explain what you mean by "they are different in genomic regions"

Kevin

ADD COMMENT
0
Entering edit mode

why important snps remove in --geno 0.2 filter steps ? i have gwas study in plink but remove important snps in alzheimer disease ( rs429358) --geno step. pls explain Kevin Blighe

ADD REPLY

Login before adding your answer.

Traffic: 3803 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