Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def omgekeerde(sequentie):
- sequentie = str(sequentie)
- if sequentie == "a":
- return "t"
- if sequentie == "t":
- return "a"
- if sequentie == "c":
- return "g"
- if sequentie == "g":
- return "c"
- def canonisch(dna):
- dna = str(dna).lower()
- my_list = []
- my_list.append(dna)
- my_list.append(dna[2] + dna[1] + dna[0])
- my_list.append(dna[2] + omgekeerde(dna[1]) + dna[0])
- my_list.append(dna[0] + omgekeerde(dna[1]) + dna[2])
- een = sorted(my_list)
- return een[0].upper()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement