コード例 #1
0
ファイル: test_phylo.py プロジェクト: felixgrewe/pycogent
    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);")))
コード例 #2
0
ファイル: test_phylo.py プロジェクト: blankenberg/pycogent
 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);")))
コード例 #3
0
ファイル: test_phylo.py プロジェクト: Skylersun/pycogent
 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));")))
コード例 #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));")))