-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrosalind_DNA_to_RNA.py
17 lines (13 loc) · 2 KB
/
rosalind_DNA_to_RNA.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def DNA_to_RNA(text):
original= text
RNA=''
for x in text:
if x in ['A', 'C', 'G']:
RNA+= x
else:
RNA += 'U'
# Return counts
return (RNA)
#string = 'CCGTTGCAGTTTGAACGGATTCCCGCGCACCGCGTCGATGGTAGCCTGTAGAAGCCTCGTAGTCCCAGATTGTTAAAGTAAGCTTGCTTATTACCGATTAGTACGTTCCGGGTGCTGGCCCATAAGGTGGGATACACGGACTTATGGCTGCGACATGTGACATTAGCCACACAGCCAGTGCTAAGGCTCTACTATAGTTAACAGAGACAAAACGAGACGTTGGGGGAGCACCCGAACACACCATCGAGCCCGAGCTGGGAAAACAGAGCACCTCTACAAGTGTAGTTACCAGTGACTAAAACTGACTTGCATCCCACAATTTATTACATCACGAGCCGCAGGCCGGTTTAGGACGTTCTACGTGTGTTTGTTTACCGGTATTTACCAACCGGGTGATGTTTCTTCCCGGCCTGGCAGTTCTGTTGCCGAAACTTACTTACAGTTTCTGCATTTCTAGAGGACCGATAGCTACTTGTCTCGCTCTTAGACTTGATTGAGTCAGAGCGATCGGTCTCCGCTCTCGCCATTCTGCTTCTAGGCCACAGCACCGCTCAGTACGCGGGGCCGACTTACTAAGCATCGTTGCACTCGCTGGATGCCTTTCAAGAAATCTAGGAAGTATAGCTTAGCCCTAGCGCGGAGGCGCGGTATAAGTGGGACCTTAGGCATATTTATTGGAAATAGTCATGCCGAACGGGCCAATTCGGCGAGATGATACACCTAAGAATGGACGAAAAAATGTGACACTACAGGATTATTGGCCATTACATGATATAGGCTCGGACGTTGTTGTTATCTTTTCGTAAACAAATTACCTATTGTGTCAGAGGCATGTCATGTAGACCTACTGCAACTCGCTGAAATTATGTCATTCCATCCTCT'
string = 'AAAGATTAAATCTCTGTACGGGTTAGTCTTGGCTTCGGCGGGGCTCACTACCCTGTCTGCAGTCGAAACCTCAACGAATGGCGGCTCAAGAGGTCCTGTGGCAAGTCTCCCCAATATTTGTGGTCAACGTATTTTTGGAGGGCGATCAGAAGGGCTCTCCTCTTAAATGACATGTTGGGCCGGTCCGAAATGTCCTGGAGAACTGAAAGATACAGCACTAGCATACTGTGGGTGTCGGATTCCACGCTCAGTCCGAAGCACCCAGTATCTCGCCGTATTAGGGGGATAATAGAGGTGCAAGCACCCAAGTCCTGGTCTCTGCGTCGAACCTTCAGCACAAACGAACAAATAAAAATTAGACGTTAACATCTTTGGGTGCTAAGTATAAGAACCCTGTACTTCCCAGGGGGCACTCCCGATCTCGTTCGCTCATTTTGTCTGCATATCTTAGCTCGCACTGCATACATTGCCTTCGTATGTGGTCTCCATCAAGGCACAGACTCTCCTAGGATCAGGGTGAGCATTATGAGCCGGCCAATTCCTTTGCGGGGGACCGCGAACAAAAGGCCTTAGTCGAAGATGGTTCTCAGCTTTACCGGGCAACTAATTCGAGGGAACTTATCATCTAGACGCGTCGTATGAGTACAACACCCACAGATTCGGGAAGTGCTCTTAGTTCCTTTGTGATGTGAAGCTCCTACGCTGACGGCAATATTCAGCGCGACCAACCGTCTTCGTCTTAACATTGTATTATTAGTTGGGTGCCGAACCAACCTCATCCAACATTCAGACGCAAACCTCAGAAGAAGTTGCTCTGCGCAAGAGGTGTATGAGCGCACCTGGTGCGCCAACCACACGATCTAGCAGGCATACTACGATTTAATACCATAAAGCGCGGCATTTG'
print DNA_to_RNA(string)