-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.py
20 lines (16 loc) · 8.34 KB
/
3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def revers_compliment(DNA):
reverse = DNA[::-1]
print(f"{reverse} = Reverse")
compliment = ''
for b in reverse:
if b == 'A': compliment = compliment + 'T'
if b == 'T': compliment = compliment + 'A'
if b == 'C': compliment = compliment + 'G'
if b == 'G': compliment = compliment + 'C'
print(f"{compliment} = Reverse Compliment")
return compliment
# x = revers_compliment('AAAACCCGGT')
# print(x)
sample = "CAGTACCCGAGCTAGTAACAATGATTTCGGGGGGTGCAATACTGGCGCATTCGACCGTTAGAGTACAGCAACGCAGATGAAAGGGTACCACCATAGCTATGTGCCCGCACGTAATGAGCCTACGCTTGCTATACGTGCTTTTCTGTACCCGCCGAATCCTGCCTTCCCCGGTTACATCAATGGGTGTAGCACTATTAACCCTCAGTAAACAGAATCCATGGCGCAGCTCACGCATGGCTACTCATCAACTGCAAAACAGCACCTGCAGCTGCTGCGGGTGCACGGCGACAATGACTATACGAACAGCCTCATCCGGTGGAGCGTATCTCTAAAAACAGAACGACGTGGCACTGGCCTCTTGCCGAACATCCCACCATTGACTCTAGCGCAGATTATTAGGATGGAATCAAAGAATGACTCCCATCACGGGATTACGTTAGATCAGCACCGCCTCATGATGCGTACCATAAGGCGGGGTGCTGTCAGAGACTAACTCATGGCGCATGCCTTGAACCATAGCGCACATCCTTGAGGAGGGTTCTTTGGATGGATGAAACGTTGTCGGCCTTGCCAAGGAGACACGACGGCCACGATTTCGCAGGAACATATGCTCGGTTATTTACTAGCGAGTGCCTACCAACATCACAGTCTATATGTGCTTCACGGGAAATCTTCCACAGACCCTTCCTAAAATTAACGGCATCCCCAATGTCTTGTAACAATCCGTTAGCACAGTAGTCCTGGCGCCAATTGTCATAATTGTGTAGTTTACAGGACGCTCGCGAGCGATGCTCGTAAGAGATAATCCTCCCACTAGAATTGACCCAAGAGGGCGCGTACGAAATATGTCCCTCGAGGATGTTTACACGAATAGTGCCAGGCAGTGTGTGCGTTCTAAAGCTCGCAGCGTGCTAAGAAAGGTCTTATACTTTTTAATGTAGATTGTAAATTGGGAAAAAGTAGGACGAGCCCGGTTGGAGGCTGAGAGTCATCGACTTGTTGTCACGTTTTTAAAAAGTTCCATATATTGGATGACAATGACCGAACGGCAGGTTTTGCAAGGTTAAGTGAGGTTAAGGGTAAAGCAAACGCCCATCCACTGGTAAGCCTAAATAAGGCTATAGTGTAAAAAATAACCAAGGTCCCGCGGGTTTCGTCAGCGTCGCCGGGGGGTGACCGATGAATGTCTTCCAGCACGTGATTATTTCCTGCTTTGGTCCGGCTTGATTTGAAATCTGGAACTGTGGTGTAAATATATCTGTTCCCGGAGAGTCAGAGGAGATAAGCTTAGCTGCGGTTGAGTTAGTAGAGGATGCACAATTCCTCAGGTATCCGGTTAACGAACCCCTGACGAGCTAAGCTTGGCGTTTCTCATCTCCGCAGCGCTATTGAGCGGTCTGTTGAACAGCTCCTAAGAGCCCTCACTTTCCTAAGTCGTACAGCCATGTACATAGCATCCCACGTTACGCATGGTCTCAGAACTTCTGCCTAATGCGATCTTCAAGCCACTATCTAGAATGATTGTGCCCCATGGACAATTCTCGGGAAGATCAGTTGAAGACTTGAATCGCATTTGATGTCTTAAGGATCCCCCCACTGATCGCGCGTCAGTTGCTCTGCTGCCAGAAGAGACCGGCAGGGACGAGCTTGTCGATTCCGGAGCCTGAAGCAATTAACCCTGAAACTGGCCGCTGGCGGGTTAAGTCCGCGTCTGAGGTGTACGCGTATCCCGTCGAGTAGCCTTCCAGTCCCTAGTTGCCGTCATCCGTACCGAACTGCTTTGCGGGAGTCTAGTGCTCGAGCTGCGTAGCCATGAGCATAACTTCCCTACCCGCGGCTAACCATTACGGCGAACTTCTCTCGGGGACTTGCATTAACACAACCTGGCTGTAGTTTTAAGACGGGGTCCGTATTTAACTAAGAGGGCTTTTCTCTAGACCTCAAGTTATCGCACTCGTCTGCATCTGGCTTATGTTGGGGCATCTTATCGAAGTCTGTACACTCCGTACATCGCGTCACTCCAAGCCACGGCAGATCTGCGTTTCGGTTATTAAGAACCAGTCGGCCATATTCCCCAAACGAGCGCCGAGGTGAGAGTTGTGCGTACCCTAGCGTTATCCGCGATGGTAGCTTCGGCTTCGAATAAAATCGTTGAAAAACTTCCCGCGGGCTTGACTGATGAGGTACGTGAACCAATACGAACGTTTCTTCCTTAATACTTCTAGCACAGGAGGGAGATCAGTGCCAACATTTAAATCGCTTATTATCGACTGCCATTCTCCGGGACCGTAACAGATGGAAATTCTATAATGGCGAAAATCTCGATTCCCCTTTTTTATATAGATCATTGGCGTCGCTTGTACATGCTAAGAGGGAAATCCCCGCTTGCTCCAGCTCCAAAGTATGAAGCCCGCACCCTGAGGCGTCAGAGTGATGCGGCCCACTGGCCCGGCCAGTATATGCGCTCCAGTTTCAGCTAGTCTCACTGCTTGACATCTGGGCTAAGAACCGAGTTTCTTCCATCGACGCCCGCCGTACCTCACTTATTATTCTATTTCAAAGCTGCCTTATATCTCAATCATGAGCGGACAGTGTTATCTCTTCCGTAGACTGATGAATTAAGCAAGAGAGATAGCAGAGAGGGATAAGGTGCTTGCCCGGACGCGGCTATCGCTAACGATTCCTCTAGGGGCGGCACTTAGATGACCGGAATTAAATCCAAGTAGGTGTGCCGAGTATACACCTTGTACTCGTTGGACTTATATACCCACGCACGACTTGGAGGTGCTGTTCCCTACACGATCGACTCCCTCCCTCACCGGGGCACCCTATGAGGGTTTGATCGAGGCAAAGCAGTCATAGGCCCGCCGTTCTTACACCGACATTTGCCAAGGGAATCCTCAGTCAAACACTATCCCGACGCTGGGCACGTTTAATGTAATCTCGTTCGTCGTATTTTCGCTCGGAATCTAAATAAACGTATACAACAAGGTTGGATACCTGTACTACACCACCCCCCGCGGACCTCATGATGGAACACTCCGACCTGAACTCAACTGTAATCTTGAAGCCTAATAGACACGAGCACGGCTTGACGGTGACTTCTTCTTATTTCCCGGGACCCGCAGTAGCAATGCATGCCTTTGCGTGTTCCATATAACGAGCGTGTTTCGCTTCTATAGTTACTGCCCAGCAAGACTGTGGTCATTTACGATTCACCAACACCACGCCGACTTCATATCGCGGCGGCGGAAGCCACCGGATTATAATGACAGAGCGCCCTGGCAAGGTCCCGTTCCTCCTGGTCGTACCAGAGTTGCGGCAAGCATAATAATTTGGTGTCTATCAACAAGCGCGAGTTTCTTTTTACATACGCGTTCGAAGATCCGATCCGACGAGACAGGGCCGACCTACGCGGTTATCCCGGCGCTGACCAGCCGAAGATGGGAGCTAACCTTACACAGAGTGAGACATACTGAGAACTCCAGACCAGAAGACAGATCCTGACGGCATGTTAGATAAATCAAGGACTGAGTATTAGAAGGCTCTTAGTTTCGAGACGTAAAGGGAGTACTCATGAGTTGGTCCTACCTGAGTAGCCTACACCTACGAGAGGCACCGTCCATCTACCTCATTCGCAGAGCACAGATGCGTACGAGACACCCCCCCTCCAGCCTGCTCATGAATAGGATGAATACCTCACAAGTACGCACCAGATAGAGGTCTACCGTTGTGACTCTTACAACGAGCTAATCTTGTTGATAGCTATCCCACAATCCCCTCGGGGAGACGCCTATGGTGCACCCCAGTTCATTGGATCATTGTTCGTCCCACAGCAGGAGCCAGTCTTATCGACGTCTTAAGCCTTAAAGCGGTTACAATAAGTGCTTTGATGGTAATGCGGTCGTGCCCAGTGTATCGGATAAAGCCGAGACAGCTAATAAGGTTGTCTCGGTTTATCCTGGTGGAGCAGCTACGATGCCGAACCTTGTAACATTGTGTTAGTTTACTTCTATAACCATCTTTGCACCGGCTGCCTAGTAAATGGTTGGTGACTTCTAATCTGCGTATTCGTATCACACCAAGCTAGGCGTAATCTATGTCGTCACCTGTAGCATGCAGGAGAGCACGAATTAGGGTTAAAATCACTGGAAGCCCATGTGGAAATAGCCAGCGGACATAACCGACGTCATAGCCCGGTACTCCGCAAGCCGACGTAAAGAAACTCCGTGGGGCGCCCGGGGAAAGCAGCGCGATGTATGCTCTTAGTTCCTTACACTTTAGTGTAGTGTTCGCCTCCTGAACGAAACAAGCCCTCGTTATGTGACTATACCTCTGGACCCTACTTGACGTACTCACAATGTGGGGTACCAAGCCGAAAGATTACGAAGGGTGGTATGTAACGTTCGCGAGTACAGCGGTTTGATTGACGCAAAGCTCCCATTACCTTTTAAATGAGTACGCGGCTTGGTCAAATACAACCCGAACACTTCATTGATACCGGATCGGCAGCGCCCCGTAGGACCGCAGCCAAAAATGTCTGCCATTTCTGGCTAGATTATCTTCACCTAAGAATGAACTCAGCGTAACAAATGTCGTATGCTGATCCAGCTATTTCGACGTCCGTACTGTGGGTTACTATGCGGCGGACTTACCGGGTGTGAGCGTGCTCACGAAACGAGTTTATCAGTCAAATTTCGTTGTGGAGCTCCGCCCAAGTTACACTGCCAACTAGTTCATCTTTTTGAACGCAAAGCCCGACAAAGAAGTGGGGTAGTGTGCGAAGGAGCCCATACATGACGTGGTCGCGTTAAACTGCTTCATGGGATGGGAATATTCCTTAAGTGTACTCAGTCGGTTAACAGACCCCAACAGTCTGAGCGCACTTTTACCATGCATAGTTCGGCCTAGGTCCGCTAGTTAACTGTGCGGGGTTATTTGGCCGTGGATTACGTCATGCGCCTTCCGACGAGTTAACGAAAAGTAGAGTCAATTCCGCATTTTGCAGTTAAGATTGCTCAGTCCCATATCGCTCCAAGGGTCTAGACGAGCTAGATTGAATCTTTTGGAAGCGTCTACGACGGTTATGGGACGGCGCTATCCACATTGTGGTAACATGTGTTCAGTGTACGTGACCGTATCGGGGGCGTATCGCACCTTTATGTCATTCTATTTTTGGACCTAATAAGTGCGTAGTAGCTGAAACTATCCTAAGAGTAGAGCTCACTCCCTTTTAATATATGCGCCCGGATGATTACGTTGGATCGACCCTACGGGCTATATATCGGACGGCACGCCTGTAACGCGTCTTCAAGGTATACCTGTATTTGAGCTTCATCTTCTGTCTGGGTTAGGAGCGTCTAGTGTATCGGGGTGCCCTTGGAGTCATGTATAGAGGTAAGACATAGACAAGACCCTCTAGCTTTCAACCTACACTGTGAGTAGACATAATTAATATAAAGAGGAGTAAGCGTCCTTTCGTACTATTCACTATTCGGTTGCCACCCCAAAGTAGGGCAACACTGCGATCTCCTGCGGCTGCATAGCTACATTTGGAGCATTACCGCGTCTGTCCTACGGGATTGGTTGCCAGAGAAGTCCATGCTAGAATTTTCTGCGGTAGCATTCGCGCTGACGGATTAACTAATAGTACGCACCTTGTTAGTCCCGGGAGACTTGCCAGATAAGCGGAATATCTTAGACTATCGTCGTGGGTGCCATATCGTACTTTTATGACCTGCATCATTGCACTAAAAGTAACTCTGGCACCGCGGAGCAGATTCGGGCCCCACCTGCCTGGAGGAGGAGCCCCCGACTCCGTGGGTGGTCCGTGAGAGGAACAGAAATCAATGCGATACTAAACGTCGCGTCTAGCTCGACCAAGAAATTCATACTAAATTGGCCCAATCATTGGCATACAGCACAATCCTTACCGATATGTCCTATGGACGTTATCTGGAACAGTTCTCCCTCCAGCGTATAATCTGCGTGGCTGTCATACCGAGCCCCTCACATCATGAGGCATGGCCCTAGTAACGCTCGTCGCACAATCCTCCCCCAGAGTAGAAATGGTACGGCTATTCTTGAGAGCCTTGACCCGTGAAACTGACGAACCGTTCAATTTGCCAGAGGTTGGAGAACGAGGGACAGACACGATGTTTGGAACAGGTCCTCTAAGACTGGCCTCTATCTTCTCTCTCAGATCGTCCGCTATTCAAGACACACCTCTAGGGGACAAAGCAGCGTCCCCGTTAGCCGAATTCAGAAAGACATCACCCTTGGATATGATTAGCTACCATTTGACTTAGTGTGGTTCTACCAATACATTCGACTAGCAGGAATCACACTCCAACCGGGCAGTTCTCCCAACAGGAAGAAAATTACACCACCGAGATCAGGGGCATTTTCCTGACCTTCGGGTATCCCTGCATCGGACTTGAGTGCGAGCAGGCTACACATGCAAGGAAATACTTCTTTCCGAAGATTGCACCTGGGGGACTTTGGTTTACGCTGGTAACCTATGTGCCTGTGGCGAGCATTAGACCTTGAGATAATGACTGTATGTGTTCGGGTCTCATCGGCCATAAGTCGATAATGACGAGCGGCGGGCCCTGTAGTTGCTACGAATCAGCAGGGACTAGGCACGAGATGTCCAAAAGGTTAAGGGAATTAGGAATAAAAATCAGGGGTGTCCACGCGCTTACAAACGTTTTACGATGGTTTCTTACTCTTACATAGTAGGTGTGCAGATCGTGTCGGCGGCCACTCCCGCTGGGCAGGTTGCCGGGTGCCACGAAACATCTTTGCCTTCGCGGAATAAAGAAGGCATGACCGCGTTTCAACGCAGTCAACCTAACTTCGACGCTTCTGCTAGCATGAAACACCAATCATCTGCACGCATTTGCAATCGGTCGGGATAAGTCGATCTATTTACTAGGGTATATACGATGGACCTAGGTACTCAGTTGAACTATGACGTATTTTAGATCACTCCACGGGGTGATTTCTGCCAAACAGTTAGCGGCCTGCGCACCGCGGTCCTGCAGGTCAGGGCGGACCCACTCAACGGGCGGGCACCGAAATTCCCAATGATCGAAAATATATGGACCTGTGTTGGGGGTGCGAGATTTTATGGATGCGCTAGACAGGTAAGTCAGTCGCCCTGCATGTCCTGTAGTCGAGCTGGACCGTAAAGTCCACAGGTGCAGTCGTGAGGAGCCGAATGATTACACTGGCGACATATTAGGGCCCGCAATCCGACTGGCGAAAACGAGATCGAGCCGAGACACTTATTGATTACCGCTTGTTGAAGCGCTCTACGCAGGCCTGATCGTATATTCGGTATCGGACCTAGGTTAGCTCACACTGACCCCTGGGTATTGGGTCTCTCACTATTATCAGGCAGCTTAAAGCAAGGCTCGAACCGGGACAATTCCAGAAGTGAGGGTATACCGAAGCTCTCCGTGCGCCTTAATCCACTGTACATACGCGGTGGGGGGGGCCCGTTGAACAGGGTGGTGAGAAGATGCCGTTACCCAGTTTTAGTGTTCCCTGGAAACGACAGAGTGCGTTGACTAAGCGAGCGATAGCCGAATTTCGTCTGGGCAGGCCTCTGGGTCGGGAGATCTGAAGCCACTAGTCTAACCCGTTTTGACTTGAGCGGTTAACCATTTGCGGCCGGCCGAGTACGTGATCACGCCATCCTCATAGCCTACAGATTGTATGCGGATCCTCAAAAGTTCCCATAGGAATCCCGCCGTCAATTGTGTTCCACCTTCCATTTAGACATTTGGTTTTCTCCCTCTCACGGCCCCCAAGCTACTTATGCCGAAGGAAGCGTGTCCCGTCAATCTGCTCGGTGATGGAAGGAGCGGTCCCATACGAGCACGGCCGTGGGTTGTACAAATGTGTATCTTAGGTTGGTGCACCATTAAATTGCTAGGTACAAACCCTAGAACGCTCCGAATCTGTCGCACCCCGCGCATCGTCCGCGAAAGGACTCTGCGCATGTGGTACGTGCGATACCGACGGGGG"
ans = revers_compliment(sample)
print(ans)