|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+# Homework hw2 task1
|
|
|
2
|
+
|
|
|
3
|
+## prepare your task
|
|
|
4
|
+
|
|
|
5
|
+Run the cargo command to prepare your task1/ directory as a library
|
|
|
6
|
+
|
|
|
7
|
+## task
|
|
|
8
|
+
|
|
|
9
|
+Calculate the Hamming difference between two DNA strands.
|
|
|
10
|
+
|
|
|
11
|
+A mutation is simply a mistake that occurs during the creation or
|
|
|
12
|
+copying of a nucleic acid, in particular DNA. Because nucleic acids are
|
|
|
13
|
+vital to cellular functions, mutations tend to cause a ripple effect
|
|
|
14
|
+throughout the cell. Although mutations are technically mistakes, a very
|
|
|
15
|
+rare mutation may equip the cell with a beneficial attribute. In fact,
|
|
|
16
|
+the macro effects of evolution are attributable by the accumulated
|
|
|
17
|
+result of beneficial microscopic mutations over many generations.
|
|
|
18
|
+
|
|
|
19
|
+The simplest and most common type of nucleic acid mutation is a point
|
|
|
20
|
+mutation, which replaces one base with another at a single nucleotide.
|
|
|
21
|
+
|
|
|
22
|
+By counting the number of differences between two homologous DNA strands
|
|
|
23
|
+taken from different genomes with a common ancestor, we get a measure of
|
|
|
24
|
+the minimum number of point mutations that could have occurred on the
|
|
|
25
|
+evolutionary path between the two strands.
|
|
|
26
|
+
|
|
|
27
|
+This is called the 'Hamming distance'.
|
|
|
28
|
+
|
|
|
29
|
+It is found by comparing two DNA strands and counting how many of the
|
|
|
30
|
+nucleotides are different from their equivalent in the other string.
|
|
|
31
|
+
|
|
|
32
|
+ GAGCCTACTAACGGGAT
|
|
|
33
|
+ CATCGTAATGACGGCCT
|
|
|
34
|
+ ^ ^ ^ ^ ^ ^^
|
|
|
35
|
+
|
|
|
36
|
+The Hamming distance between these two DNA strands is 7.
|
|
|
37
|
+
|
|
|
38
|
+
|
|
|
39
|
+
|
|
|
40
|
+
|