[Biopython] Tree Comparison in BioPython

阮铮 rz1991 at foxmail.com
Fri Mar 22 20:02:37 UTC 2013


Hi,

I was wondering if there is any tree comparison support in BioPython? I want to know if two trees are topologically the same.


The idea I have now is to convert trees into an adjacency matrix and check their equality. This is not easy because internal node typically don't have a name and the structure of the adjacency matrix may be different. Or I may go through all internal nodes and check if they have the same terminals. This idea is also not straightforward as typically for an internal node in one tree I have to compare it against all the internal nodes in the other tree to potentially find a match.


Is there any suggestions? Thanks!!


Best,
Zheng




More information about the Biopython mailing list