Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# cogent.evolve.pairwise_distance.TN93Pair.run

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

```    def test_tn93_from_matrix(self):
"""compute TN93 distances"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run(show_progress=False)
self.assertEquals(calc.Lengths['s1', 's2'], 10)
```
```
# same answer when using ambiguous alignment
calc.run(self.ambig_alignment, show_progress=False)
self.assertFloatEqual(calc.Dists['s1', 's2'], 0.2554128119)

# but different answer if subsequent alignment is different
calc.run(self.diff_alignment, show_progress=False)
```
```    def test_distance_pair(self):
"""get distances dict"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run(show_progress=False)
dists = calc.getPairwiseDistances()
```

```    def est_tn93_from_matrix(self):
"""compute TN93 distances"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run()
self.assertEquals(calc.Lengths['s1', 's2'], 10)
```
```
# same answer when using ambiguous alignment
calc.run(self.ambig_alignment)
self.assertFloatEqual(calc.Dists['s1', 's2'], 0.2554128119)

# but different answer if subsequent alignment is different
calc.run(self.diff_alignment)
```
```    def est_distance_pair(self):
"""get distances dict"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run()
dists = calc.getPairwiseDistances()
```