This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Revert Allele Data To Atgc With Plink After Recoding To 12 Format

I've recoded my SNP data in --recode12 format using PLINK. Now I want to recode back to my data in ATGC data. What will be the update allele codes?

plink

To recode SNP alleles from A,C,G,T to 1,2,3,4 or vice versa, use --allele1234 (to go from letters to numbers) and --alleleACGT (to go from numbers to letters). These flags should be used in conjunction with a data generation command (e.g. --make-bed), or any other analysis or summary statistic option.

But my data are only in 12 format..not in1234 format. What should I do? I am using the command --file mydata --update-alleles But it need a text file to update alleles. I want to update alleles imputed through fastPHASE. Thanks

"I've recoded my SNP data in --recode12 format using PLINK" Then you must have original MAP file with ATGC alleles?

1 answer

To recode SNP alleles from A,C,G,T to 1,2,3,4 or vice versa, use --allele1234 (to go from letters to numbers) and --alleleACGT (to go from numbers to letters). These flags should be used in conjunction with a data generation command (e.g. --make-bed), or any other analysis or summary statistic option.

Well, I am not too sure then, maybe try this - you need a text file which has the original ATGC alleles

A A  1 1
A C  0 0
A C  1 2
C C  1 2

and then create a file for the --update-allele comand in this format

SNP identifier
Old allele code for one allele
Old allele code for other allele
New allele code for first allele
New allele code for other allele

For example,

   1 1   A A
   1 2   A C
   ...

will change allele 1 to A and allele 2 to C for , etc.

Mean I am to give a list for all of 6000 SNPs. Its I think impossible. Thanks

If you can code a little with perl or shell scripting, it is not impossible.

Log in to answer this question.