is a tree fully resolved?

42 views
Skip to first unread message

Wasiu Akanni

unread,
Apr 10, 2012, 6:44:55 AM4/10/12
to dendrop...@googlegroups.com
Hi, i would like to know if there is a way in dendropy or any other module out there to tell if a tree is fully resolved or not??
I have about 500 trees in a file of which some are fully resolved and some are not. i need to separate the fully resolved ones from the ones that are not fully resolved.
thanks for your help in advance

Aj

Jeet Sukumaran

unread,
Apr 10, 2012, 8:55:36 AM4/10/12
to DendroPy Users
The simplest would be to iterate over the internal nodes of the tree,
counting the number of children of each internal node. Anytime you
encounter more than two children, return False. Otherwise return True.
Reply all
Reply to author
Forward
0 new messages