Hello,
I'm using Dendropy with unrooted trees. I have to manipulate the trees so am interested in details regarding the representation of unrooted trees in Dendropy.
Thing seems to be awkward when it comes to unrooted trees. For instance, all the tree manipulation methods are coined in terms of children and parents (e.g. new_child(), child_nodes(), etc.). What does it mean to have a "child" in an unrooted tree?
I also was surprised to see the following:
In [10]: from dendropy import Tree
In [11]: tree = Tree.get(data='[&U] (a, (b,c));', schema='newick')
In [12]: tree.print_plot()
/---------------------------------------------------------------------------- a
+
| /-------------------------------------- b
\-------------------------------------+
\-------------------------------------- c
In [13]: print(len(tree.nodes()))
5
In [14]: print(tree.internal_nodes())
[<Node object at 0x7f949fe79860: 'None' (None)>, <Node object at 0x7f949fe799e8: 'None' (None)>]
Although I've specified an unrooted tree using the "[&U]" syntax, there seems to be an extra internal node. This tree looks rooted to me. Is there a way to avoid this?
Thank you.