-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrevcomplement.py
7 lines (6 loc) · 8.41 KB
/
revcomplement.py
1
2
3
4
5
6
7
from Bio.Seq import Seq
my_dna = Seq("AACATGCGTCGAATTCCGGTCCAAAACCAAGAAGCTATGGAGAAGCTTGGTGCAAAAGGAGAATCTCGTAATCGTTGGTATACAAAACCATGTTCTTGGATCGAAATGAGTTGGACTTTTAACACTGAGCTGCTAACTGATGTCTCTTACTAGCGATTCGACGTCCATGGTCGTGCAGCGGCATTAGCCTGACCGCATGATGCACTCTTTCTAGTGCGTCTGTCGGTGACTACTTAACTTGGTTGGTTCACATGATCCACTAAGGGCGTTTCTGCGGACCTGAGAACTCCGGCAATGTTAGTTACGCTGAGCTATTATGGTGAGTCCACCGTCGGGACAGCCACGCAGACGCTGGTTTGGAACCCTTGAAATATCCTGCACGCGATAGGATGTCAATATTGAATTATTAATCAACACCGTCCTTCCAGTTTTGCGCTCGCACTGCCAGTATGTACGAACAATACCTTTGTGATGCAAATACGTAAAAGTTGTGATCTGATCTCAACACCTGGCGCTTTCCTGCCGGAAAGATTCTCTTTTGAATGCCGCGGCGGACCCTAGAGTAGGACTAGTTCCTACTTGCGCGGCAAGTTTCAAATCTACAAGAATTAACGCATTCACCTCACACGAACGAGCCTGGTCGACTCACTATTACTCCCATCCGGAGCCTCCTACCCATTCTAGTGATATATTCCGGCAGTAGAGACGGATGGCTTGCCCAAGGTTGACGGCAGCGATTAAATCGTTGAGGGTGTTTAGGACCTGAAATACGGACTGATTCACGCGTTTTTGGCTGTTTCGTTTGAGACACCCTTCTCGCGCTCTGGCATTTATGAACCTAGTTTCACTGAGGCAACTACCGCAGGAACTTCTGATTCGCCTTCCACACAATATCTGGACATGTAGCCATCTTAATTTGCAGTGGCACAAGACAAATTACCCACGGTGATGCCCCAGTTATTCAGATCGCCCAACCCTAGTCACCGTAAACTGTCACCGTACGCTTAATTGGTTCGATACTTTCGCCTAACTTAAACTACCGGGGACTCGGTCTGGTACGGGAATTGCGAACGTAGATCCTATGAGCTTCGCAGATATGGCCCAACCACCAAAGACCTTACAGAGATACGGCTGATGGCCATGAGTGATCGATCCTACCAACGCGGGCAATCGATCTTTAGTAGTGCTCTCGGGAAGAGCATACAGCCGGCGAGCAGAATCTGGGTCGGAACTCAACAAGAGTGGTCACTGAGCAATAACAGTCGAACTCACAGATGAATTTATCAAACGGGGTATCCGCTGTGGCGGCCATCCAGACGCGGGTAGTAAGAGGTGCTCTACGCAGCCCTCTCGACGATTATTGTATCGATTTTCGACTCCAGTTATCAGGTTTCTATATCAAGGCTATATATTTTGACCTGGCCCCTCAGTACTCATATAGTCTCATCGAAAGGTGGTTGTCTGAGCTGTCAAAAAGCACCCGATCTGCCCCGCTCAACCCATGCCTATCGTCTTGGTTGCGTGGCGCGTTTCTGTAGTGGCTGGCAAGTTGCGATCGTAGCCTCCCGGTCTTGCCGGGACGCGGCTTTACTCCGGAGGCAAGGAATGTGTCTCTGGCTGTGGCGGAAGGATTTGACGTTCAAGGTTAACCATAATCTCCATGCGTGAGTGTTCAGCGCATGTAAGATGAGAAGATTTCCGACCTAATGGATCGTCGTCCAGCAGCGAGCGCCGCGATCAGACTAGGCATATACAAAGTTCCATGCTATTGAATCGCCCGACGTAAGACTGCCAACCAGCCTTTTCGTGCGTATCTAACGCGTTACTATGTTGCAACACCCATGGTTAGGTATAGTATATCTACACATTGAGGGCACTATAAGAGTGACGGGCGAGGCTAAAAGCAACACTTATTGTGCTGGCGTCATCGAGGACGTAACACAATACCTCAGCTACCCGATTAGATGGGTATCTTGGGAGTAGTCGTAAGCTAGACATGAAATCTAGGCCACTCTCGCTCTCTTTCGTCGTTAGAAATACTTATGACGCATTTTATTAACAAGACAGCGGCCATCTGCGAGCGCTGCGAGATTCACCCAGGTTTCATCTCACTCGGGCTTGGCTGGAGACGTACAAGGAGCAGGGGGAGGCTACAGATAGTTGCGCAAATGGGCTTGAGTAGCAAGTCCTTGGCACGATACTAATTACCCAATAGTTAATCTAAAGCATCTCTCGGATGTAAAGCTTAACTTAGAAATCTCTACGATCTATAGAACAAAGAGATTTACCTAGCGCTAAGTTTTTTCATAGGAGAAAGTACACCCCGGATAGGAGATTGGCACTACTTAGAGATACTGCGAACTTCCCTCACTCCTTGTGTTCTCGTGGAGTATACTCTACTTTCGAGAACAAATTGACACGGGGCGTCAACTCCGTATCTAACTGTAATATACGTCTCATCGAGCGAACGACGCGTATCAAACATGAGATTCGACATTGTCGCGCTGAAGGATTGGTGTTGGGATCCTGAACAAAAGTTCCCTGAGCGCGCTAAGCGTGATGTATAGTCGAGTTTTGGGACCACTAGACTAACTGGTCCTGTGCGGGAGGCACTAATTTGAGCGACACCGCGAACCCCGCGCCCCATTTACTTGGGTCCAAATTACCCACCCAGAACAGGGCGGACCAGTATGGACTTTAATCACAACGGGTGCCCCTTCAACGCTCATGGTGGGGCCCCAACCCCACACGACAATTTGGGTAAGCGCCGAGCGTGCTCGTTGGTCCGAAGCTTTCGTTTAGGATCAATTTGCTGGAAGAATTCTGTACGACCATCAAAATCCCCCATAGCTATCCAGTTCAGTACGACAGCCAGGGGACGCGGGAGGTCTCGTCGCGCTAGGAATTAGCCAGAATTTTATGGTACAACAATGCTAGTCTACGTTCCCAGATCAATCACATGGCGCCCGACCCCACGCAGTATGAACCTAGCGCCTCACGCAACGATTCAGCTATGGCGCTCAAAACTTTGCAAGGAACGGCTTGCCAGGTCTTCAGTACGAATCATAAAATACTGTGCCGTACTGCCTCTAGTGAACCTTCGGTGGCGACCGGTTCCGTGGTACTTCATCTAGTTAGCCTGGGCTCAGCTAAAATGTAATCCGATATGTCGTTCGCGCTCCCGTTAGGGCATACTTACCTCAGAGCGGGGAAGGGATAAAATTTGAAAGCACCCGGGCCCAGGACTCTCTTTGTCTGAACGAATTGCTGCGAGTGCTGTGGCTGAGCTGGCCGTCACCACCCTAGCTGCCATGTAAATGAACTATTGGCATTTATTATAAGTTCCCCCCCTGAGTACCCGATGTTGGTTCTCGCGGACACTAAGCGGTGCGGAGACGCGTTTTCGCTGGAATGAATGGGCCACAAAAGCAAGCGCCGATCATACCGTTCTCATGCATCGGTCGTGCGGGATACCAGGTCGAAAAGCGCACCGGAGTTAATTCTCGGCATGCTTAGAGTGGGCCTGGTTACGTCGAGACGCTATCTGCCCCTACCGGCTGATGTATTTCGATAATCCGAGTCTCGAGGCCTTGGATACACCCCAGTGTACAATTGTAGGACGTAGAACGTGATGTCTGACGCGTTGAGTGCTTTATCATGCGGACACTCCCATGATTTCTATGATGGGACGTCTGAGGTGTCCGCTGGCGAGTATATGATCAACCGTCGGGTTATTTTGAGTGGTGGGTTGTGCGCGAAGTAGTTATTGTGCTTGGAAATTTAGGTAGATGGTTTTCTGCCGAGACATAGAGCGCTTCTTAGTATTTTTGGGGCCGGGTCAAACCTTCCGACCCCGCGTAACTTCAAAGTGCAAGGACTACCTAGCAACCGATTAGCTTCAAGTGCGGGCGTCAGAGTTTAGATAAAGGGGCCGTTAATGCGCGTATCACCACATGCTATATACACTCGGCCCTGTATACTCCTCCTAATATCGCTTGATGAACGCGTTCTACGAGCGCCTCGTACATAACCGAGGAGCCCCCCTGCCCCTGGCTATCCCCGCCACCAAGCTGTCCAAAACCCTACCCCAGGCCGGAACACCTTCTGGCATTAACCAGCAGCGCCAGTGGTAGCAATCTCCTGGGATCCTATGAGACGACGTATCGCTGTTTTTAAGCTTGCGACTGTCGGCCCGACTTCCCGGCAAGAAAAGTTAGGGTATGTGATCCGCCACACGAATCTGGTAGTTCATGCCTTTGCGCGACCGTGAGATACGCAGACTTGAAACCTCTTAGTAATCCATAACGACAATCCCTGCACGGCCACCAGCGAAAACTCTGTATAGTCTAACCGATATTGAACCATGGACACATATTTGCATGGCCGCTGGTTTTTCTCCGTATAATACTCCTTTGCGCTCCCCGATCATGATAAGGCGGGCCTCATAGTGAAACGCTGCCCGGACGCGTTCTGGATCTCGAGTCTCAACCTTTAGGTGCGCTCATGGGACGCCCCACCTTTCGTAGCAGGGGTTAGCGTTTGAACGGGACGCCCAGTGCGCCTATCTCCAGCACGGTAACCTCAACGAATCTTGCGGTGTTGTGAGATTATATAGATGTTCGGTACTTGTGTAAGATGGCAATAGGGACATAGATCTCAACTCAGTCTGCGGACGCCTCCCGGTGCGTGGCTTCAGCCGGGCGGGAGGTCGGGCAGCGTTAGGCCCTGATCACAAGTCATAGAAAGGGGGAGTGTCTGGTCTTCGAGGTAACACTTTGGTTTGACAGAACAATACCCAATAAATGTGTACTAACCACCGCAACATCGAAAGTCAACCAGCGCAGCTGAAATGATCATAGTGGGGTAGTGCGCGACTACTATAAGCACTTACCCGTTACGTTGTTATGTAGACGGTAATTCTTCCTTGGGCACCGCCGCATAGTATCTCCGATTGCGTCTCTGACAACGGTCTCGAGTCTAGCTAGTACCGGTGTCTAAGTGCATGCCTACTCTAGTGTGGACGTCTCTCAGTGTTTAGTCGAATGGTCACCCACCATGTTAGATGGGCCGTAAGTTTTAGTGGTGACGTGTGCTCGTTGTAAACCCCGAACAACCGGTTACGCCATATCTAAACCCGTTCCACGGATTCGAGCCCGAGCATGATGGTGCCCTAACCGCCAATGACGTGCCGAAACCGTATTAGATCCGCTATTACCATAAACTCCCCGGGTTTCTTACAACACATGGTCTCTACCAATATATTGTACCTAGTCGCGAATTGGACACGTTTGCCTGCTTTTTTTAGTTCCACGAATGTGCTTAGCAGCTTTACCAAAAGCGACCTCCGTAATATCGAGAAGTTTAGACTGCCTCCGTGCCTCGCAACTTGGTAAATCTGTCCGGTACTACTTAGAGTGATTGATATCGGCCTATCCCGTACACACAGTACTACAGAAATCGTTGTATCCGTACGAATACAGACCACTCGATAATGATGGGTAAACAGTCAGATTACACACCTCCTAACCCAGTCCAGTGGGGGTCTAGAACGACGTTTCTATGCAATAATGAACGAAGAACTGAGCGATAGAGACTTTAAGAGTGCCACACACGCCGCATGGGTGTTTAGAACGCTTACCGGTAGAACAGCTGTCGAGAACTGTAAAAGAAAACACAAACGTTAGCGTGCACTAAGCAATAGCTCAGATGCTATTACCATCTCTAGGATAGCGCTACAACAGGACCCTCTGGACCACCGCGCAACGTATGCGTACTTCGATCGGGGGTAGGACTCCGTTAGCTGAGGCTGCGGCATGCGGAGCACTGTAGTTTCCTGGCTGCATGTTACTCTATGTGCATGATTGTATGACGTGACATTCTCTTGAGGTAAACCGAATAAAAAGTAAATTCTACTTTAACATCACCTGCTCGACTGTTCCGCAACGCCCCCTTGGCGTCGGAGACTGCGATTAGCTCGACTAAATCCTATGTGCGATTATGATTGGGCTACAGCGACCCGTGCTAGACCTCGTGATCTGGAAAGGGCCTGCACAGGGAGAACATGGTGAGCCGTTTGCTGGTAATGTACCGAGACGCACGTGTGCACTTATACGCAATATGGAAGTAGGCTCGCACTAGTGCACGCTGGACCAATCGGTGTTTCCCCTAACCCCAGAAGCAGTGCATCTCTCATCGATTCATCGGACGTACATACACGGCCCTTGTTCACCATATCCGTGGATCCATGTCGCCTTACCCTCAAGGGCAGCTCCCGGGACAGTCTATAGGAAAAGGGACAGCCGGTCCCAGGTTCTATCCATAGTAGAGATAAGACCTAAAGCATTAAACTACTGAGGGTGAGCCTGAGCTAATCCCTGCATATAAGACCATAAAAGCTGAGCAAGGAGCTTAGATTTAGCTAAGCCTCGGAAACGGATCTATTTAGTCTCAGGTGAACTGCCTCATGGGGTTCACAAGCAAGGCGTCCCTAAGGCGTTTATGCACGTTCTATTAAGCCTTCGTGCTTATAGGTCTACAGCGCATGGCTTATGAGAGCGAGCGGCGGAACGTAATCCCAGCGCAAGGTACGTCTTAGCCTCCTTCGCTCGCCACGAAGATCTTATCGATTCCGTATTCTTGGAGCATACGGAGTTCTTGCATCAGTAGAATATTGCTGAGCAAGATCTGACTTTACGTTCCAGGACGCCGCAAGACGACTATAGCGTAACGTGGCCAAAGATTCCGTCCCTTCCTCGTAAGTTTTCATGGCAAGCTAGATTTTTCGACAACATTTACGACTGAGCAGCTAGTCCAGAGGGCTACCCGGATGTATCGACGGAGAAGCAGATTATTCTTCTGGCTCTCCTGAGAGAGGCTCACCCGGCTACCTCATAGCTGTGCAAAGCTCCCAGGTAGTTAAGAGCTGGATGTATATCTATCTATACGGGTAGAGGGGAGTTGCCATCGGCATTAACCGTAGACTGTAGGGCAAGACTCGCGTTTGGAGAACTTGGCGGATGCGCTTGTTCGGTAGGCAGGTGTCCACATTTAGATCACTGGTTTGGTTTCGGTTGGGGGGATTTTATGGCTGTGAAAGACTAAGTGTCCCGTTTCGCGTGTTCGTGTTGGGGTCTGCCGCCTAGGTGCACGCAACTTTCATCGTTTCGCCTCCTGTGAAGAACCCGCTATGCCAGCTAGAACAACATCCAAAGGACTCTTGTCATTAAGTCGTAGCGAGGTCCTTCGCTTACGCTTCAATGTCGAGTGTCAGGCTCACATTCGGGCCAAAGGTACCCGTCCCATTAAGTGCATTCGAACTCATACTGGCCCTGTCGTGTAGCAAAGACACACACTCTTCGTTTCCTCTTCCTAGTACGACCCTGGAATGAGTATGTGATCATTCACAGGCTGACTTGACTGCAAGGCGGCCCGCGTTAATTTAAGTGAATTACGAGTAATAACGCCCTCCTTGGGTCCTTGTGGGGAGGTATGATAATCAGCAATCTACCGATACACAAGGTCCGAGGTCGCGTCACGAAACGTCGGCTGCCTAGGGGACCGGCATGATACGTAATACGTCTACCTGCCGGCATCGCTATGCCGGTGGTTAGTAGGGGGTCGATATTTTTGTTTCTCCTTGCGTCTCAGTCAGCGGGTTCTACCTGTTGGATATCCTATTCAGATTGTCAGAGCAGTCCTTCTATTCCAGGATCATGCTTTATTTCCATCGCTCCAGTCTTGTCCGGGCCGACGGCCCGACTATCGTGGGCTGAAGGGTCAGCTGAATTTGTGTACTTGAATTACCATGAACTGTGAAAATCTATGACTACGAGTATAACGTTTAAAAGATGAATGCTTTTCGCACACTGTACACTGCTCATAAACTAAATGCAGGCTCGTTATCAGTTTCTGTTACATCGTTTACACTTGGTACATAGTTAAAACGGTTCCCTTAGGGGGAACATATCTACTACCTATTTCACGACAGACGCAAACTGAGTAAACATTGGATTGAGCCTTCCTTGAGTTTCCAATAGCGAGGTACTTTATTAGAGGACGTAGGAATGCTCTTTCACGAACCACTGACGGTCGTGCAGATAGTGCTTAGATTTTTGTGCTCTGGGCCTCACGATTGTAGCGTCTAACCAGGCGCCCATTTAACTCGCAGGCCCTTTCAATAATCTACCTTTTAAGACCCGGCTAGCCAGCTAAAATTAGATACTTCGTCACTTTGTGCTCGGTAGGCGTTTGGGCATCGCGAAATGACTATACTAACTTTTTTCACTACGACTGACACGCGGATAGAGACATGCATGTAAAAAGGTTATCAAAATGATGGTCTTCGGG")
#could use any DNA sequence
#method reversecomplement returns the reverse complement, recall that this is a reversal of the string and then swapping C for G, G for C, A for T and T for A.
A=my_dna.reverse_complement()
print(A)