Sebastian Hungerecker wrote:
> Li Chen wrote:
>> How do I change all the As into T and all the Ts into
>> A in the old sttring?
>>
>> old_s="AAATTAA"
>> new_s="TTTAATT"
> 
> new_s = old_s.tr("AT", "TA")
> or if you also want GC
> new_s = old_s.tr("ATGC", "TACG")

Thank you very much,

Li
-- 
Posted via http://www.ruby-forum.com/.