get_cherries() missing cherries? -- trying to get all bipartitions

15 views
Skip to first unread message

Joe

unread,
Feb 6, 2014, 3:29:06 PM2/6/14
to bio-...@googlegroups.com
Hi Rutger,

I am considering this tree:
(A,(((B,(C,D)),E),((F,G),(H,(I,(J,K))))),L);

The following are actual cherries: (A,L), (C,D), (F,G), (J,K);
But get_cherries() does not report (A,L).
Is this a bug, or am I misunderstanding?

The reason I came across this, is that I would like to consider every bipartition in a tree. I did not see a way to do this so I tried using get_entities to traverse every possible clade and build my own bipartitions, but this did not behave as I expected. Many clades are missing from my get_entities call – for example, (A,L) and ((A,L),(((B,(C,D)),E)). I thought maybe it was a rooting problem, but is_root() function says this tree is not rooted. Am I missing something here as well?

Best wishes,

Joe

Rutger Vos

unread,
Feb 7, 2014, 2:17:45 AM2/7/14
to bio-...@googlegroups.com
Hi Joe,

ah, good catch -  I think get_cherries just assumes the trees are rooted, so you found a bug. What exactly is the end result you are trying to achieve?

Rutger


--
You received this message because you are subscribed to the Google Groups "bio-phylo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bio-phylo+...@googlegroups.com.
To post to this group, send email to bio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/bio-phylo.
For more options, visit https://groups.google.com/groups/opt_out.

Joe

unread,
Feb 7, 2014, 6:14:04 AM2/7/14
to bio-...@googlegroups.com
Hi Rutger,

Thanks for your response. I guess get_entities suffers from the same bug.
My end goal is to get every possible bipartition in an unrooted tree.
The only difference from get_entities and "get_bipartitions" is that "get_bipartitions" would return a series of clade pairs.
 A working get_entities subroutine would allow me to do what I need it to do.
I can contribute this code to Bio-Phylo if you think it might have general interest.

Is this something you would be able to get to soonish? 
Reply all
Reply to author
Forward
0 new messages