This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Binary Bim File To Agct Bim Format

Hi All,

I have a SNP data genotyped with Affymatrix 6.0 Chip. Its BIM file is in 1234 format. e.g.

1    rs3094315    0    792429    3    1
1    rs11240776    0    805132    3    1
1    rs2980319    0    816985    1    4
1    rs2905036    0    832343    2    4

And I want to convert it in to AGCT format. e.g.

1    rs3094315    0    792429    C    A
1    rs11240776    0    805132    C    A
1    rs2980319    0    816985    A    T
1    rs2905036    0    832343    G    T

thanks

snp affymetrix

2 answers

If your using PLINK, try --alleleACGT.

You could combine the unix commands tr and cut

while read L
do
   echo $L | cut -d '  ' -f 1,4 | tr -d "\n"
   echo -n  " "
   echo  $L | cut -d ' ' -f 5 | tr "1234" "AGCT" | tr -d "\n"
   echo -n " "
   echo $L | cut -d ' ' -f 6 | tr "1234" "AGCT" 
done  < yourfile.txt | tr " " "\t"

Log in to answer this question.