Gotta love it when folks answer their own questions--really helpful for the rest of the community!
• 0 views
•
link
Hi all, I am have one file with genotype info from many individuals, for example (file 1)
SNP1 1 1 1 1 1 1 0 1 0 1
SNP2 2 2 2 2 2 1 1 2 2 1
I have another file with the information of alleles of each SNP, as example (map file):
SNP_ID Chr Pos Alele_A/Alele_B
SNP1 17 306961 T/C
SNP2 1 72709827 A/G
How can I to convert file 1 to their respective genotypes (from file 2)?
Important information:
Thanks
Clarissa
The code is:
Log in to answer this question.
You can either use plink --recode option or use awk or sed (Example : sed 's/1/AB/g' inputfilename > outputfilename).