예제 #1
0
파일: tree_lib.py 프로젝트: afcarl/myTools
def report_taxa(tree_file, scheme='newick', listing=True, counting=True):
    a_tree = Tree()
    a_tree.read_from_path(tree_file, scheme)
    if listing:
        for leaf in a_tree.leaf_nodes():
            print(leaf.taxon.label)
    if counting:
        print('Taxa #: ' + str(len(a_tree.leaf_nodes())))