예제 #1
0
def tree_features(tree_file):
    """Add a feature to the tree called <spptag> with the Species Tag"""
    tree_handle = EvolTree(tree_file)
    for leaf in tree_handle.iter_leaves():
        leaf.add_feature("spptag", leaf.name.split("_")[0])
    return tree_handle