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)
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)
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)