How can I change 0123 into ACTG with tr or Perl?

Posted by neversaint on Stack Overflow See other posts from Stack Overflow or by neversaint
Published on 2010-04-21T02:21:15Z Indexed on 2010/04/21 12:53 UTC
Read the original article Hit count: 145

Filed under:
|
|

I have a file with such list:

100
101
102
103

What I want to do is to replace every 0 into A, 1 into C, 2 into G, 3 into T. Hence we hope to get

CAA
CAC
CAG
CAT

© Stack Overflow or respective owner

Related posts about tr

Related posts about bash