Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1.  
  2. def omgekeerde(sequentie):
  3. sequentie = str(sequentie)
  4. if sequentie == "a":
  5. return "t"
  6. if sequentie == "t":
  7. return "a"
  8. if sequentie == "c":
  9. return "g"
  10. if sequentie == "g":
  11. return "c"
  12.  
  13.  
  14. def canonisch(dna):
  15. dna = str(dna).lower()
  16. my_list = []
  17. my_list.append(dna)
  18. my_list.append(dna[2] + dna[1] + dna[0])
  19. my_list.append(dna[2] + omgekeerde(dna[1]) + dna[0])
  20. my_list.append(dna[0] + omgekeerde(dna[1]) + dna[2])
  21. een = sorted(my_list)
  22. return een[0].upper()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement