Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 413 Bytes
#!/usr/bin/python
import sys
rna={}
f=open('rna_table.txt','rU')
for line in f:
x=line.split()
codons=x[0::2]
acids=x[1::2]
rna_new=dict(zip(codons,acids))
rna.update(rna_new)
f.close()
f=open('rosalind_prot.txt','rU')
s=f.read()
print(s)
for i in range(0,len(s),3):
if rna[s[i:i+3]]=='Stop':
sys.stdout.write('\n')
break
sys.stdout.write(rna[s[i:i+3]]),
You can’t perform that action at this time.