Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def mutation_detector(DNA1,DNA2):
- """recieves 2 DNA sequences and compare for mutations, return the first
- index in which a mutation has been detected and -1 if there are no mutations"""
- if sequence_check(DNA1)=="Wrong input" or sequence_check(DNA2)=="Wrong input":
- return "Wrong input"
- if len(DNA1)!=len(DNA2):
- return "Wrong input"
- for i in range(len(DNA1)):
- if DNA1[i]!=DNA2[i]:
- return i
- return -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement