This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Genotypes conversion (Affymetrix chip)

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

snp chip genotype

You can either use plink --recode option or use awk or sed (Example : sed 's/1/AB/g' inputfilename > outputfilename).

1 answer

The code is:

  • -1= no call
  • 0=AA (homozygous for the reference allele)
  • 1=AB
  • 2=BB (homozygous for the alternative allele)

Gotta love it when folks answer their own questions--really helpful for the rest of the community!

So sorry it was my first question here. I wanted to add some important info, but the correct is to edit the question. Can I delete my reply?

Log in to answer this question.