README.md (1610B) - raw
1 # Hamming 2 3 Welcome to Hamming on Exercism's Perl 5 Track. 4 If you need help running the tests or submitting your code, check out `HELP.md`. 5 6 ## Instructions 7 8 Calculate the Hamming Distance between two DNA strands. 9 10 Your body is made up of cells that contain DNA. Those cells regularly wear out and need replacing, which they achieve by dividing into daughter cells. In fact, the average human body experiences about 10 quadrillion cell divisions in a lifetime! 11 12 When cells divide, their DNA replicates too. Sometimes during this process mistakes happen and single pieces of DNA get encoded with the incorrect information. If we compare two strands of DNA and count the differences between them we can see how many mistakes occurred. This is known as the "Hamming Distance". 13 14 We read DNA using the letters C,A,G and T. Two strands might look like this: 15 16 GAGCCTACTAACGGGAT 17 CATCGTAATGACGGCCT 18 ^ ^ ^ ^ ^ ^^ 19 20 They have 7 differences, and therefore the Hamming Distance is 7. 21 22 The Hamming Distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :) 23 24 The Hamming distance is only defined for sequences of equal length, so 25 an attempt to calculate it between sequences of different lengths should 26 not work. The general handling of this situation (e.g., raising an 27 exception vs returning a special value) may differ between languages. 28 29 ## Source 30 31 ### Created by 32 33 - @bistik 34 35 ### Contributed to by 36 37 - @kotp 38 - @kytrinyx 39 - @m-dango 40 - @rfilipo 41 - @yanick 42 43 ### Based on 44 45 The Calculating Point Mutations problem at Rosalind - http://rosalind.info/problems/hamm/