コード例 #1
0
ファイル: test_phylo.py プロジェクト: yurong2020/cogent3
 def test_limited_wls(self):
     """testing (well, exercising at least), wls with constrained start"""
     init = make_tree(treestring="((a,c),b,d)")
     reconstructed = wls(self.dists, start=init, show_progress=False)
     self.assertEqual(len(reconstructed.get_tip_names()), 6)
     init2 = make_tree(treestring="((a,d),b,c)")
     reconstructed = wls(self.dists, start=[init, init2], show_progress=False)
     self.assertEqual(len(reconstructed.get_tip_names()), 6)
     init3 = make_tree(treestring="((a,d),b,z)")
     self.assertRaises(Exception, wls, self.dists, start=[init, init3])
     # if start tree has all seq names, should raise an error
     self.assertRaises(
         Exception,
         wls,
         self.dists,
         start=[make_tree(treestring="((a,c),b,(d,(e,f)))")],
     )
コード例 #2
0
ファイル: test_phylo.py プロジェクト: aglucaci/cogent3
 def test_truncated_wls(self):
     """testing wls with order option"""
     order = ["e", "b", "c", "d"]
     reconstructed = wls(self.dists, order=order, show_progress=False)
     self.assertEqual(set(reconstructed.get_tip_names()), set(order))
コード例 #3
0
ファイル: test_phylo.py プロジェクト: aglucaci/cogent3
 def test_wls(self):
     """testing wls"""
     reconstructed = wls(self.dists, a=4, show_progress=False)
     self.assertTreeDistancesEqual(self.tree, reconstructed)
コード例 #4
0
ファイル: test_phylo.py プロジェクト: rahulghangas/cogent3
 def test_wls(self):
     """testing wls"""
     reconstructed = wls(self.dists, a=4)
     self.assertTreeDistancesEqual(self.tree, reconstructed)