Coverage for lingpy/convert/tree.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Functions for tree calculations and working with trees. """
""" Function cleans a taxon string in order to make it apt for newick-representation. """ # strip whitespace off
# replace white space underscore
# exclude all kinds of brackets
""" Convert a newick file to a tree matrix.
Notes ----- This is an additional function that can be used for plots with help of matplotlibs functions. The tree_matrix is compatible with those matrices that scipy's linkage functions create. """
tree.taxa, key=lambda x: len(tree.getConnectingEdges('root', x)), reverse=True )]
nodes, key=lambda x: len(tree.getNodeMatchingName(x).tips()), )
|