Binary Bim File To Agct Bim Format
2
1
Entering edit mode
12.7 years ago
User 0422 ▴ 150

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.7k views
ADD COMMENT
2
Entering edit mode
12.7 years ago

If your using PLINK, try --alleleACGT.

ADD COMMENT
0
Entering edit mode

thanks, it also worked!

ADD REPLY
1
Entering edit mode
12.7 years ago

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"
ADD COMMENT
0
Entering edit mode

thanks, it worked!

ADD REPLY

Login before adding your answer.

Traffic: 2266 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6