def test_print(self): """Print tree""" root = Newick.Clade() #root.parent = None root.name = 'root' buildTree(3,2,root,'root') phyloutil.printTree(root, sys.stdout) print(root)
def test_simple_manual_tree(self): """Manually constructed tree""" root = Newick.Clade() root.name = "root" child = Newick.Clade() child.name = "kid1" root.clades.append(child) child = Newick.Clade() child.name = "kid2" root.clades.append(child) phyloutil.printTree(root, sys.stdout)
def test_reading_from_guide_table(self): """Read table""" root = Newick.Clade() root.name = "cellular organisms" #print(root.depths()) inf = open("./test-phyloutil/test1/Pseudozyma-antarctica-1.txt", 'r') table = util.readTable(inf, header=True) #print(table) tree = phyloutil.treeFromClassificationTable(table) inf.close() phyloutil.printTree(tree, sys.stdout)