예제 #1
0
 def test_dcj_circular_excision(self):
     a = Genome(Chromosome("ab"), Chromosome(".cd."))
     b = Genome(Chromosome(".abcd."))
     self.assertEquals(calculate_distance(a, b, method="dcj"), 1)
예제 #2
0
 def test_dcj_default_example(self):
     a = Genome(Chromosome("ab"), Chromosome(".cd."), Chromosome(".e."),
                Chromosome("fg"))
     b = Genome(Chromosome(".acD."), Chromosome("be"), Chromosome(".fg."))
     self.assertEquals(calculate_distance(a, b, method="dcj"), 5)
예제 #3
0
 def test_dcj_single_split(self):
     a = Genome(Chromosome(".ab."))
     b = Genome(Chromosome("ab"))
     self.assertEquals(calculate_distance(a, b, method="dcj"), 1)
예제 #4
0
 def test_dcj_backwards(self):
     a = Genome(Chromosome("abc"))
     b = Genome(Chromosome("cba"))
     self.assertEquals(calculate_distance(a, b, method="dcj"), 2)
예제 #5
0
 def test_dcj_intermediate_2_dcj(self):
     a = Genome(Chromosome(".aBdCE."))
     b = Genome(Chromosome(".abcde."))
     self.assertEquals(calculate_distance(a, b, method="dcj"), 4)
예제 #6
0
 def test_dcj_single_swap_dcj(self):
     a = Genome(Chromosome(".acb."))
     b = Genome(Chromosome(".abc."))
     self.assertEquals(calculate_distance(a, b, method="dcj"), 2)
예제 #7
0
 def test_dcj_single_a_indel(self):
     a = Genome(Chromosome(".ac."))
     b = Genome(Chromosome(".abc."))
     self.assertEquals(calculate_distance(a, b, method="indel"), 1)