What is the default tree rooting employed?

18 views
Skip to first unread message

Sourya Bhattacharyya

unread,
Jan 13, 2015, 6:16:38 AM1/13/15
to dendrop...@googlegroups.com

Hi All,

I am using Dendropy for phylogenetic tree data reading from a newick file. I am using the function

        dendropy.TreeList.get_from_path(input_filename, schema="newick", preserve_underscores=True, default_as_rooted=True)

If the input trees are unrooted, and I want to read the trees as rooted using above function, what is the default tree rooting setting employed at dendropy? Is it outgroup based,
or rooting is based on the midpoint of the longest edge?

Thanks,
Sourya

Jeet Sukumaran

unread,
Jan 13, 2015, 3:13:20 PM1/13/15
to dendrop...@googlegroups.com
The changing the rooting state of a Tree object simply sets a property
value (``is_rooted``) True or False. It does not, by itself, change the
structure of the tree. It does, however, change a number of calculations
on the tree are carried out (e.g, RF distances), and how trees are
compared. When encoding splits (which some calculations do behind the
scenes), if a Tree with a basal bifurcation as its ``is_rooted``
property set to `False`, by default the basal birfurcation is collapsed
to a trifurcation.

In all cases, changing (or even setting) the root position is not done
automatically by setting the ``is_rooted`` attributed. This is
considered a client-side responsibility. There are numerous methods
available for you to do this, e.g. ``Tree.reroot_at_edge()``,
``Tree.reroot_at_node()``.

All of this is covered in pretty good detail, with examples, in the
documentation :

https://pythonhosted.org/DendroPy/tutorial/treemanips.html
> --
> 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/
--------------------------------------

Sourya Bhattacharyya

unread,
Jan 14, 2015, 12:16:19 PM1/14/15
to dendrop...@googlegroups.com
Hi Jeet,

Many thanks for your reply. It indeed resolved my confusion.

Thanks,
Sourya
Reply all
Reply to author
Forward
0 new messages