Exemplo n.º 1
0
    def test_weighted_trees_satisyfing_cutoff(self):
        """build consensus tree from those satisfying cutoff"""
        sct = LogLikelihoodScoredTreeCollection(self.scored_trees)
        cts = sct.getWeightedTrees(cutoff=0.8)
        for weight, tree in cts:
            self.assertTrue(tree.sameTopology(Tree('((a,b),c,d);')))

        ct = cts.getConsensusTree()
        self.assertTrue(ct.sameTopology(Tree("((a,b),c,d);")))
Exemplo n.º 2
0
 def test_weighted_trees_satisyfing_cutoff(self):
     """build consensus tree from those satisfying cutoff"""
     sct = LogLikelihoodScoredTreeCollection(self.scored_trees)
     cts = sct.getWeightedTrees(cutoff=0.8)
     for weight, tree in cts:
         self.assertTrue(tree.sameTopology(Tree('((a,b),c,d);')))
     
     ct = cts.getConsensusTree()
     self.assertTrue(ct.sameTopology(Tree("((a,b),c,d);")))
Exemplo n.º 3
0
 def test_weighted_trees_satisyfing_cutoff(self):
     """build consensus tree from those satisfying cutoff"""
     sct = LogLikelihoodScoredTreeCollection(self.scored_trees)
     cts = sct.getWeightedTrees(cutoff=0.8)
     expected_trees = [Tree(t) for t in "((a,b),(c,d));", "((a,b),(c,d));",
                             "((a,b),c,d);"]
     for i in range(len(cts)):
         cts[i][1].sameTopology(expected_trees[i])
     
     ct = cts.getConsensusTree()
     self.assertTrue(ct.sameTopology(Tree("((a,b),(c,d));")))
Exemplo n.º 4
0
 def test_weighted_trees_satisyfing_cutoff(self):
     """build consensus tree from those satisfying cutoff"""
     sct = LogLikelihoodScoredTreeCollection(self.scored_trees)
     cts = sct.getWeightedTrees(cutoff=0.8)
     expected_trees = [Tree(t) for t in "((a,b),(c,d));", "((a,b),(c,d));",
                             "((a,b),c,d);"]
     for i in range(len(cts)):
         cts[i][1].sameTopology(expected_trees[i])
     
     ct = cts.getConsensusTree()
     self.assertTrue(ct.sameTopology(Tree("((a,b),(c,d));")))