示例#1
0
 def testDnaRoundTrip(self):
     ape_c = ape.as_ape_object(self.dna_chars)
     dp_c = ape.as_dendropy_object(ape_c,
                                   taxon_set=self.dna_chars.taxon_set)
     self.assertDistinctButEqual(self.dna_chars,
                                 dp_c,
                                 distinct_taxa=False)
示例#2
0
def is_binary_tree(tree):
    """
    Determines if a tree is binary
    @param tree: dendropy tree
    @return: true/false
    @rtype: bool
    """
    r_tree = ape.as_ape_object(tree)
    return robjects.r['is.binary.tree'](r_tree)[0]
示例#3
0
 def testTreeListRoundTrip(self):
     ape_t = ape.as_ape_object(self.trees)
     rt = ape.as_dendropy_object(ape_t, taxon_set=self.trees.taxon_set)
     self.assertTrue(isinstance(rt, dendropy.TreeList), type(rt))
     self.assertDistinctButEqual(self.trees, rt, distinct_taxa=False)
示例#4
0
 def testTreeRoundTrip(self):
     for i, t1 in enumerate(self.trees):
         ape_t = ape.as_ape_object(t1)
         rt = ape.as_dendropy_object(ape_t, taxon_set=t1.taxon_set)
         self.assertTrue(isinstance(rt, dendropy.Tree), type(rt))
         self.assertDistinctButEqual(t1, rt, distinct_taxa=False)
示例#5
0
文件: test_ape.py 项目: jjhoyt/gengis
 def testDnaRoundTrip(self):
     ape_c = ape.as_ape_object(self.dna_chars)
     dp_c = ape.as_dendropy_object(ape_c, taxon_set=self.dna_chars.taxon_set)
     self.assertDistinctButEqual(self.dna_chars, dp_c, distinct_taxa=False)
示例#6
0
文件: test_ape.py 项目: jjhoyt/gengis
 def testTreeListRoundTrip(self):
     ape_t = ape.as_ape_object(self.trees)
     rt = ape.as_dendropy_object(ape_t, taxon_set=self.trees.taxon_set)
     self.assertTrue(isinstance(rt, dendropy.TreeList), type(rt))
     self.assertDistinctButEqual(self.trees, rt, distinct_taxa=False)
示例#7
0
文件: test_ape.py 项目: jjhoyt/gengis
 def testTreeRoundTrip(self):
     for i, t1 in enumerate(self.trees):
         ape_t = ape.as_ape_object(t1)
         rt = ape.as_dendropy_object(ape_t, taxon_set=t1.taxon_set)
         self.assertTrue(isinstance(rt, dendropy.Tree), type(rt))
         self.assertDistinctButEqual(t1, rt, distinct_taxa=False)