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

# cogent.evolve.pairwise_distance.TN93Pair

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

```from cogent.util.unit_test import TestCase, main
from cogent import LoadSeqs, DNA, RNA, PROTEIN
from cogent.evolve.pairwise_distance import get_moltype_index_array, \
seq_to_indices, _fill_diversity_matrix, \
_jc69_from_matrix, JC69Pair, _tn93_from_matrix, TN93Pair, LogDetPair, \
```
```    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)
```
```    def test_distance_pair(self):
"""get distances dict"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run(show_progress=False)
dists = calc.getPairwiseDistances()
```

```from cogent.util.unit_test import TestCase, main
from cogent import LoadSeqs, DNA, RNA, PROTEIN
from cogent.evolve.pairwise_distance import get_moltype_index_array, \
seq_to_indices, _fill_diversity_matrix, \
_jc69_from_matrix, JC69Pair, _tn93_from_matrix, TN93Pair, LogDetPair
```
```    def est_tn93_from_matrix(self):
"""compute TN93 distances"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run()
self.assertEquals(calc.Lengths['s1', 's2'], 10)
```
```    def est_distance_pair(self):
"""get distances dict"""
calc = TN93Pair(DNA, alignment=self.alignment)
calc.run()
dists = calc.getPairwiseDistances()
```