Problem
Given two strings
Given: Two DNA strings
Return: The Hamming distance
a="GAGCCTACTAACGGGAT"
b="CATCGTAATGACGGCCT"
count=0
for i in range(0,len(a)):
if a[i]!=b[i]:
count+=1
print(count)
Evolution as a Sequence of Mistakes
A mutation is simply a mistake that occurs during the creation or copying of a nucleic acid, in particular DNA. Because nucleic acids are vital to cellularfunctions, mutations tend to cause a ripple effect throughout the cell. Although mutations are technically mistakes, a very rare mutation may equip the cell with a beneficial attribute. In fact, the macro effects of evolution are attributable by the accumulated result of beneficial microscopic mutations over many generations.
The simplest and most common type of nucleic acid mutation is a point mutation, which replaces one base with another at a single nucleotide. In the case of DNA, a point mutation must change the complementary base accordingly; see Figure 1.
Two DNA strands taken from different organism or species genomes are homologous if they share a recent ancestor; thus, counting the number of bases at which homologous strands differ provides us with the minimum number of point mutations that could have occurred on the evolutionary path between the two strands.
We are interested in minimizing the number of (point) mutations separating two species because of the biological principle of parsimony, which demands that evolutionary histories should be as simply explained as possible.
'Python > rosaland' 카테고리의 다른 글
Translating RNA into Protein (0) | 2018.11.30 |
---|---|
Mendel's First Law (0) | 2018.11.26 |
Computing GC Content (0) | 2018.11.21 |
Rabbits and Recurrence Relations (0) | 2018.11.16 |
Transcribing DNA into RNA (0) | 2018.11.14 |