Compute tree distance using a method by Lin et al
An implementation of the tree distance metric suggested by Lin, Rajan, and Moret, at ISBRA 2011.
This package contains a function to import and provides a command-line tool that compares two given trees and return a distance between them.
Run the program like
tree_matching_distance t1.tree t2.tree
where the two file parameters contain trees in Newick format on the same taxa.
To use the distance method from within your own code, write
from ete3 import Tree from tree_matching_distance import distance t1 = Tree('((a, b), (c, d));') t2 = Tree('((a, c), (b, d));') d = distance(t1, t2) print(d)
for a simple test. Note that this package requires ETE3 trees.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size tree_matching_distance-1.0.7-py2.py3-none-any.whl (4.0 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
Hashes for tree_matching_distance-1.0.7-py2.py3-none-any.whl