Removing redundant (unbranched) internal nodes

40 views
Skip to first unread message

Yan Wong

unread,
Nov 29, 2014, 9:35:58 AM11/29/14
to dendrop...@googlegroups.com
Is there a DendroPy function to carry out the equivalent of remove_unbranched_internals in perl Bio::Phylo (http://perldoc.net/Bio/Phylo/Forest/Tree.pm#TREE%20MANIPULATION). I.e. strip intermediate nodes from a tree if they only have a single descendant?

Jeet Sukumaran

unread,
Nov 29, 2014, 11:24:38 AM11/29/14
to dendrop...@googlegroups.com
In DendroPy 3:

Tree.delete_outdegree_one_nodes()

In DendroPy 4:

Tree.suppress_unifurcations()

-- jeet
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dendropy-user...@googlegroups.com
> <mailto:dendropy-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--



--------------------------------------
Jeet Sukumaran
--------------------------------------
jeetsu...@gmail.com
--------------------------------------
Blog/Personal Pages:
http://jeetworks.org/
GitHub Repositories:
http://github.com/jeetsukumaran
Photographs (as stream):
http://www.flickr.com/photos/jeetsukumaran/
Photographs (by galleries):
http://www.flickr.com/photos/jeetsukumaran/sets/
--------------------------------------

Yan Wong

unread,
Nov 29, 2014, 3:34:18 PM11/29/14
to dendrop...@googlegroups.com
On Saturday, 29 November 2014 16:24:38 UTC, Jeet Sukumaran wrote:
        Tree.delete_outdegree_one_nodes()
        Tree.suppress_unifurcations()

Great, thanks. Sorry to bother you but I couldn't find this in the docs.

Yan
Reply all
Reply to author
Forward
0 new messages