Entering edit mode
9.2 years ago
clarissa.boschiero
▴
20
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:
- -1= no call
- 0=AA (homozygous for the reference allele)
- 1=AB
- 2=BB (homozygous for the alternative allele)
Thanks
Clarissa
You can either use plink --recode option or use awk or sed (Example : sed 's/1/AB/g' inputfilename > outputfilename).