Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seq1 = ["G", "C", "G", "G", "C", "A", "A", "G", "C", "C", "T"]
- seq2 = ["G", "C", "G", "G", "C", "A", "G", "G", "C", "C", "T"]
- # ^
- s1 = seq1.split(//)
- s2 = seq2.split(//)
- diffs = 0
- s1.each_with_index do |x,i|
- if x != s2[i]
- diffs += 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement