-
Notifications
You must be signed in to change notification settings - Fork 0
/
reverse_comp.py
25 lines (19 loc) · 8.54 KB
/
reverse_comp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
f = open('output.txt', 'w')
def rev(s):
fin = ""
for i in range(len(s)):
fin = fin + s[len(s) - 1 - i]
return fin
def comp(s):
fin = ""
for i in s:
if i == 'A':
fin = fin + 'T'
elif i == 'T':
fin = fin + 'A'
elif i == 'C':
fin = fin + 'G'
elif i == 'G':
fin = fin + 'C'
return fin
f.write(rev(comp('GCACCTTCGAGAACGCGACCAATGTCAACCCACTTCTTTCCTGAGCTTGTCACATAAGGGTACACGGAACGCCCGGATAAGGAACGCCCTGCTGCTATCCATTTCACGTCACCTGTCCACGGCCGTTCGGCATAGAGATTTTCCGAGCGCCGAGCCACCTAAGGGTATCCGTCTAGCCGCAGGTTAGTTGCAGTTAGTGTTGCTAACGTCAATGCCAACATTACCATCCAAGTGTAAACCGAGCTTTTACACGTACACAGGTTTATCAAGGACGAAAGGGATCAACGGTTGAGAGATATCCAGTCTTGGCGAACGTATCTTAGTTGCGCAGACTAAAGAGGGGGACCCCTTTAACTATCTGTAGAATTTCATTAGTTTCCGCGGTGTTATATATTAATGCATGATTATCCAACTAGGACTGCTATCCTCGGCCACAACAGGAAGCTCACCTAAAAAAGGCAAGACTGCCGCCTACTGTGTTGCGGTTGTGAAGTGTGAAGTAATGAAGCCATCACAGCAAACTCACTGTGGGGTGGCCTCTGCAATCGACATGCGTCTCGGGTCGGATCATGGTATGGTCACCAGCACCCTTCATAAAGGATGTAGCCTGCGTTACAAGTAGTACTCTGGATGAGTGGAAGGAGACAGTACGATCGTTACCCGATGTATGAATTACTGCACAGATGCGCGCAAAAACTAGTAATAGGTAGCTGTTTTCACCCTATTGTGTATCTTCCCACCAGCTTGGTTGCATTCTCACCGATTTACCGCTTTGCGGCATTAACTACTAGGTGCGCTAGAAGGCAACGCCACCCACAGCACGCAGGTTGCCCGCGATTTGACTGCCTGGATCGTAGCGCTTATCGGTCCCGTCAGCCATTAATGACTGTTTCGTTAGGGATCTGCGCGCACGCGGGCAACTATCCCCCCCACTCAGCCCAATGGTTACTTAGGTCGTAATTGGGGTCAAATCCTTTCACCTGGGCACTAATGGTCATGAGCGCTGCCCGTGAGCTTCATCGAAAATCACCCAAACCCCCGCAGGGTATGCGGAAGTAGGAATCTAAAGCGTGACCGGGCGATGCGGAAATACTTAACGTTTAGTAGTCCCCCCTTAGGTAAGGGCGTCATAGTTAGAATTCGTACGTTCCTTTAAAGCCTTCTTACCATTGACTGGGTTCGATGAAACCGAACCCCTACCATGGTACTGTATTGTGGTTATGCGCGTTCGAGGGGTACTTTAGCCCCCGGTTCGCAGAATATAAAAGTTAACGGGCTTCATCCGGATGAGCGAGCGTTTTGAAGTTGAAACATATCCACGAAGGAATGCACGCTCTCGGCTCCGATGGATTGCCTGCCAACAACTGAAAGGCTGACGTACAAGCTTTGGTTTCGTCCTAGGCCAAGAATTAATTATCTCAGATCGGTTTAGATTGGAAAGCTCGCGATGGCAAGCGTATTGGGGGGTTGAACAAAGTCACAACTTACAATTATTGTGGCTGGTATCGACACGGAATAACAGTCTCTTATAGGCCCCGGTGAATACAGAACGCAATTCGGTATGCTTTTGGCGTATTGTGACGCCCATCTGTCGAGCTTAGATATCCAAGGAGTTGCCAATTAGCACGAAAGCTTTCCGTCGGTGGCTCTATTATAGCACGACTTCAGTACCAAGGTCCAAGGTGCTGTTCATCTGGGTGGAGATGCCATAGATTCCAGAAACTCTAAAGTTTTCAGTGGAGACAGTCGGTATCAGGGTGTAAATATGTCCGGGGATAATCGAAATGGTACTCTTGACATTCAATTCGAGAATACTCTGACACGTCTCACGGATGACTTTCTCAATGGCATTCGAGAGCTCAAACCTGGACAACGCATGCATACCCGGATACATCACTAGGAAGCAACCTATCAATAGGGGAACACAGAATTTCGGTTAGTCATCCATTGAGGATTGAGTACTTCCAACGTCGCGACTTCGCACAACCACCTCAGGCTTTGAGTTTGCGCGGGGTCGCTGGTTCGTGGACTCGAACCCGCCCTTAATCTACTCAACTTCAAGGTGAGCATGAGTCGATGTGGGCTCCGCGGTGTAAAATGTCCATCGGGAGCTGTAGAACAACGATCACAGGAATTTGACAGCGGTGTGTGTCTCACCGCATCCACGGTTCCTTCCAGGAAGCGGTTGGTACCTCAGCACTTGTGTCCTAAACAACCCGGGACCGCCCTATTGTAGCTGTGGCCGGTGCCACCTCACATAGCTTCACCAGGTATCCGATCTATGCCGACGAGGCCGGCTGAGGCCCAACACGTCGTTGGCATCGGCGGGAATCAACCTGAAACCGGAGGTACTTCTGTTATGAAATTATCTCGGAGGGCCGGCTTGAACGGGCCCGGGTCCAGACGATCCATGATCCTATTCAGGCTAAGCCAAAATTATAGTTAGTGCCCTGTTCTAGTTGGCAGGCCATGCTCCTTACCCAAGCGCCGGGAACATCACTGGCCGAGCTACGATCGTAGAAGTACCCGTCACGAGCATCGTTGCTGCCTCCACACCCCTCGCAATTGTTGCTGGTGACCGCGGGCGTCATTGTTGCACAGGAATTTGTGATGGTCGAAATAACGCAGGCTCTTTCTTCGTCTAGCAAAGGGTAGGGCAAGATCTCCTAGGTGTCAACTACTGCAGTGTGTGCCTCCCGTGTTTTGCAGACATAATTCAGTATACTGTCCCAACCGTCCATGACTGCGATCACTCGTATAAATAGCCAAGCTCCCGAGACCAAAAGCTTCCGTTACCGTAGCTATGATGAGATACGTCTCAGAAGTGACTGCTGTAGTACGCTCACCTCAGCGGCTGAGCCTCAACAGACAAATGAGGCTTGCAGGGGTAGCAAATGAGGCTCCGCAAGTGCCCAACTACCTCTGTATTAGCGTTGTAGTGAACTTGCTTGATGGAACAATAGGTTCCAAGCCTGGGTACTGGATTGTAACTAAGAGGAGAACACCGTGTGGGAGACCCTCCTAATAGTTTTGCCCTTCACCCTTCACGCTTGTCATTGCAGCAGCGAGATATCCTACAGGATTGACGTGGTGTTGAATACAATATATAGTTCTACTACGCGAGAAAAACTCTTCATTCATAGTGATTCAATTAGCTTACGGTTGTGAACTTTGCGGTACCCTTATGAATCTAGAGCTGCTCTCTCACCATAAGCCCAGCTCGATTCTAGCAGATTATTGCAAGCTGATCCCCGTCCTCGGATATACACTACAGGTAAAGGTGTCGAGGCATTTTCGCAATCACTCGCCACTCCACCAGCCATAACGTACGTAAGATCCTCTTGCGGCCGAGGCATGGTGCCACAATACAGCGCAGACGGCGTCTACGCGCTACATTATGAAGACTCCACCCTGGGTTAAAGATTATTAAAGTGGTCGACCGATTCGAGCTTCTCAATCAAATTCTGAGCCCTAATCAGGCGTGACTGTACAATGGGTGAAACGGAGCCATCCGATCAGACTTCAGGAAATTTTCCTGTTATCCAGGGACTAAGGCCATACTCCCCCTGAAATGTGTCCAAACCCTGTAGTAGAGGGGGAAGTCTGGTGCTCGTATATTCTGCGTCACGCGCTTCATGCCAGGAAGTCACTAGTCTAGGCAGGATGTAGTCATCGCCTCAGACAGGTACTACTTGAGTGGTCAGAGAAAAATTCACGCAGATGGCTAAAATAGGAGTCCACAAATACTGTGCTTACGGCCATCAAATGAACGCCCTTCCGTTCAGTTCGTCGTACGACGTGTTATAGTTACCACTCGGCCATAAGTAGATGCAGCGTTGTGTTGATACGCTACGAAAAGAGTCAAGTTTATCCGTGCCCCGTCTAAGTTTGGAGGGAGTTCTTGGGAACGGTTGCTATAGGAGAAAGCGGTTCACACCCCTAGGTGGTCATCCGTTAGTCGCGGGTCAGAGGCGACCACCTCAGCGCAATTACGCTTGGGGCAGCCTGATAACAAACCGACTCTGGCAGCGGGCGTGGTCTTTAATTCGCCCAATAGCATCCGTTGTGGGAGCAGTCGAATTCGTAAGTTTGATCTCACTAACTCAAACCTCACATTGGCAACCAGATCGCAGCCGGAGCCGATGAATTTGAAGGGTTCTGTAAAAGTCGTCTGTGTTTGGTCGTTAAGGTGGGCCATGCGGGGGATGGTGCGTCCTGGATATAAGTCTACAGGCTTCCTGATAGAAGCCTTGGCTTTTTGCGTTCCGTAACTACCGCACCACTACCGAACAGTCAGCCAAGATACGGTCGACAGAACATTAGGGACACCCAAACGGACCCAATGGTATTCCCAAAAAGACATGAGTAGAGCATGCGAGCTTGCAGGCTGGTATCACCTTGCAACTCTGTACAAGTTTGCGATTATAGACATACTAGTACAAATCGCCGGACACTTTCGGTTTCCGCGACATTAGCCAGTCCTGATCTTTCGGATTTCATTGAACCTTGGCGGGAGTCCAGGAGCAATCCGTCCGTTCATCATGCCACAGTTTGCTTAAACAGTCCAGTCCCACAGATAATGAGGTCAAGCATCTCCCGTACAACGTCCTGCTGCGGACTTCGTCTGATTATTGTCCTCATCAGACGCCGGTTGAGGATTGTAGCCAGAGATAAATACCTTGTAAAGCTTATGGCCCCCTTGCCATGCATCTGACTAATAATTATGTCAGCAGGATTACGGCGAAACGGGAAGTTTTGCCCACGTTATCATGTACGGTGTGGCCACAGTCTGCCAATTGCGATGTATACCCTTTGGGCAGGAAAACCATTCGATATCTAGGGGAGTGCTAACTCCGTCTGACGATACGTCTCATCTGACTGAGGATTCCTACGCGCGTGATACTTAACGTAACAGTCAAAGGGTAGGGGGGGAAGACCATTCCGTATTTACTGTGCACCTGCAATTCGTAGGCCAGAAACTGGAAGGTACGTATGGACGTTTAGAGGATGTTTTACAGTTATCTAGACGCATGATCTTCCAAGTTAAGGAATTATGCGACAGAGTGTGAGCCGACGGTGGGGTCTAGTGGATCCTGCGAGTTGGGCAGTGGTCAACTTATGGCTCCAGAAGGCACCTACGCCCCGGATATGCTCCATGGGCCCATGCTTTGTGTGGTACAAACATGGCAATGTGTAGATAAACGTGAAGATGCATACAGGTGTGTCGGACGGACCCCTTCATAGCCGATGCTGGTAAGCAGTGACTGGCGAAGAGCGTCTGTATCTAATCCGCACAAAGGCATGCGCAGGTGATGCCCCTCGTCGCAAGTGACAAAGACGGAGGAATGCGAGGTTGAAGAGTTCGCCACCTCGACTAGTTTCGCCATATTTTTCACAGTTGCTTTCGGTTAGGCAGGGTACGTGGCTCTGGGAACCATTCCTTCTAGCTTTGCAGGACTACGTCTCTGTCGGACGATATATACCCGTCTTCAGCACCGGTATCGTGATGGATACTCATCGGGAACCCTTCTTTTGGTGAGCCGTCGGATTGGGAGGTCTAATGACAATAGCATCAGCACCGTACCGGGCGGTGCCGGCTCGAACTAATGGTGGCGCGGAGGTTTACCATACGTAGGAGTTTGAGCTCACTATTTAGCCGACGCTGCTCAATAGCGGCAATAGTTCGCCGACGATCCCGGGTCACTTTTACAGGCAAGTACCAGTAATTTGGGACTGTGGAGCCTTTCCGACACGGCAGTAGATGGTTATTCGGGATTAGTAACACCCCTTTGATCAGGGAAAAGCTGAGACACGTGAGGAAATTCCGAGGGTCTGTGTCTGTCAAAGGGTAAAGAGTATTGGTCACGGAGGGTGCAGTTCATAACGGACCGTTCCGGGGTCGTTAGCCCTGACTTAAGAACCTAGGAGCCTCGCCCCCCGTGTCTCAAAGCAAGTAGTTTGCCTACCTAGCACTGATTGTTGCGCTCCTCCCGCCAGTCGTAACCAACGCACTTTTTGTACGGACACCTCAAGACCGGTAAAGCCCACGAGACCTCCATATCGATTCTTCTGAATTACTGTACAATTGCTCCGCTTTGGCATTGCCGGACCGCTCAGGAGAAGGGTATGACGTTCTTTAGATTCGGTAAAACGAGAATAGGGCGGGACGCGACTGGTGAACGGACTTGACAATTGTACCCGTAATGGGGAACGTATTTGCCCTTGTCACCAGCAATTCCATGGGCTAACGTCCAAAAATCTCCCCTGTACGCACATCATACGGCGCCAACCTGTCCTGTTTATCGCTTGCTCTACGATGACTGTTCATGGCCGGAAGAAATAGCACTCCGCTAACGTGGTGCCGCCGAGGATTTCGTACTGCACTTCCAGTGTGTGGCCTCCACATAGCGTGCCACGCAATTCCCTGAGACCTATCCGCTTTTCAGGGGCTACATTCCTGGTGTACTGTAAATAATCCCCCAAATCCGGGTTATGCACGCCCGACGCGGCGCTACCGGTTAGGCTGGAAAGTCTGTCTAAATGGTTTCTTTGATAACTGCCGCAACAGCCCACTCGCGGCAGAATCGTACGAAGGCACATCTATCTAGCGTGTCTTAAGACCCCATGATTTGTGTCTGAAAACAGCGCACAATGAGGACGTGCGCATCCTCAATGTCAGCAGGGTCATGTCTCGTGCACCTATCAACGATCTACAATTAACTCACGACCTGGGAAAGATGGTAATTCTGGTCGATAGCGTCGGAAGGCGCTCATATCCGCTGGTTGGCCCGTGTGGTCGGCCGAGTGCTAAACGACCGATGGTGAAACGCCCCCACGCTGATACGCATCTGTGCTCAGGTCTGTCAGCGCGCGCCCGGGCTTCGCTGGACTCGTGGACAGTAGACAAAGCCGTATACAATTCTACGCCCACGACTTCTTATCCCACCGCAATACTGGTAAGTACGTTTCTAATGACCGTCCTAACCGGTGATCTTCGTCGTGCATGAGCTCGATGCCAGAATGATCCTTCGTAACCATAACGCCATGATCTGTTCTACCGTGCCAACGCGCCTTTCGGGACCTTCAATGCCTAGTGGATGTAAGACTAGGTCAGATTCACCATGCCCATGAGCGTGCTTATGGGGCTTTCATGCTCATTCTAGAGGATGTGTTAATGATTTGCGCACACGTGTACCCCCGGTGTGGCAGGGCAGGAGCTCATCGGCGGTCTACAAGGGCCGAAGCCATAGGATAGGTTACTGGCTTTTTCATGCGTTCTTGCTCCCCGGCATGTCCACACTGCTCCGGTGCTGTCGAGTGTGCTACGTTCGCTGATGGAGCCGAGATATTATACGATAACGCAGGGGATTTGGATCCACCTGTCCCAAGGTGGGCGGGTGTTTTAGGAGGCGCGGAGACCGTTTAAGATATATTGTTATTCGGTGTTACTCTCATGGTTCCGGCGGGCCGAAGGGCAGCTTACAGAAATCCGTTAGTACTTGTGCAGATCCTGCACGTCCATACCATCATGAGTGGGGGTGCACCAGCAGTGCTCCAGCAGCGTTCACCAAGGGGCCTACCGATTCCCCGACTGCACAAGCTATGATTACCATTTGCACGTGCACCGCGTGTCGATCTAAGGCGAGCGAGAAGAAGGACGCCGACATTAAAAAAGTGTAAACCCCGAATGGACCTCGAGAATGTCAATGTATCGAACGCTTCAAAGCCTTGTACAGTGTCATTTCTTTCCGTGCTGGCCTAGTCGTGCGAGTACGTGGGGGATCCGGATCTTGGTCCTGACACCCGTACATCGTGTAGCGACATCGAGTGACCAGTTCCATTACACAGGTCGATGCCCTCCCTTGTTGGGAAACCCCCCTCATGTAAACGGGAAGGTTGGAACAGCTCTATTTTGCTAGGATCATCTATTCTGGCAATTGGGACCATTCCAAACGCCTTGAGCCTATTAACAGGGCCATTACGAAGGACCTATCTTCACACCTATAACGTCCGTGCGTATATTTGGAGTTAGGGCTAGAAAATTGCTATATAGCCTTGTAGTTAGAGCTCATCGAGAGCCACCAGCTGAAAGACTCCCCCCGGGCGTGCCAACAAAGGTAGCTCCATTTGATATGGCCTCGTATTGCCCACTAGAGATGGCGCGCACTGGGTTCGCTACGAATATCGCTGCCAAAAGTTGCATCCTAGCCGACCTAGCGAATCGTAGGAAAGCTGCACTCAAAAATGTACTCTACAAAATCGGGGATGGACAACGTTGAATTACCTCGGCCCCGATCAGTCCGTACAATCTCGAGGAAAATGACCCGCAGTTCAGCCCGGACAACAATTGGCATCACTTGTGGAGATATGGGATCGTGGGCTTG')))