Example #1
0
 def test01(self):
     with open(data_path('e_faecium.distmat')) as f:
         taxa, mat = outliers.read_dists(f)
         self.assertEqual(len(taxa), 100)
         self.assertEqual(mat.shape, (100, 100))
         self.assertAlmostEqual(list(mat[(0, 0, 99, 99), (0, 99, 0, 99)]),
                                [0, 0.003299, 0.003299, 0])
Example #2
0
 def test01(self):
     with open(data_path('e_faecium.distmat')) as f:
         taxa, mat = outliers.read_dists(f)
         self.assertEqual(len(taxa), 100)
         self.assertEqual(mat.shape, (100, 100))
         self.assertAlmostEqual(list(mat[(0, 0, 99, 99),(0, 99, 0, 99)]),
                                [0, 0.003299, 0.003299, 0])
Example #3
0
 def setUp(self):
     with open(data_path('e_faecium.distmat')) as f:
         self.taxa, self.mat = outliers.read_dists(f)
Example #4
0
 def setUp(self):
     with open(data_path("e_faecium.distmat")) as f:
         self.taxa, self.mat = outliers.read_dists(f)
Example #5
0
 def test01(self):
     with open(data_path('e_faecium.distmat')) as f:
         taxa, mat = outliers.read_dists(f)
         is_outlier = outliers.outliers(mat, cutoff = 0.015)
         out = {t for t,o in zip(taxa, is_outlier) if o}
         self.assertEqual(len(out), 7)