ultrametric trees - "backwards" branching pattern

92 views
Skip to first unread message

Jasmine Mah

unread,
Dec 28, 2020, 9:04:47 PM12/28/20
to revbayes-users
Hi all,

I've noticed a weird branching pattern in some of my trees. The trees are ultrametric, and it is as if some combinations of branch lengths are incompatible with this and so they are drawn "backwards". It's a little hard to describe so please see the "weird_branching" pic I've included.

I've seen this pattern both when making global clock and relaxed clock ultrametric trees, although it seems to happen more frequently in the relaxed clock (UCLN) trees. I've attached a sample script for each of those types of runs here.

To give a quick summary of my workflow: My characters consist of continuous data. For the global clock script, I draw ultrametric trees from dnBirthDeath, with priors on speciation and extinction. I then plug this tree into dnPhyloBrownianREML to calculate the likelihood. For the uncorrelated lognormal relaxed clock model, I also draw ultrametric trees from dnBirthDeath, but then also make a prior on branch rates for each branch. The tree and these branch rates are then funnelled into dnPhyloBrownianREML. Please let me know if there's anything I can clarify.

Initially, I had thought that there is perhaps something wrong with my prior in the relaxed clock script - maybe it is drawing internode distances that are in some way incompatible with dnBirthDeath or maybe dnPhyloBrownianREML. But now that it has happened in a script for a global clock tree I am no longer sure. 

Has anyone seen this before? Does anyone know why this happens and how to fix it?

Thanks for your help!

Cheers,
Jasmine
global_clock_script.rb
relaxed_clock_script.rb
weird_branching.png

Natalia Chousou-Polydouri

unread,
Dec 29, 2020, 11:40:54 AM12/29/20
to revbayes-users
Hello Jasmine,
This is not an error. If you look at individual trees of your posterior sample, none of them would have negative branch lengths. It is a consequence of the summarization you use. I am not sure how you summarize your posterior sample, but if you are using say median heights for your nodes, then it can be that the median height of a "daughter" node is older than the median height of its "parent" node, even if in every tree summarized the daughter is always younger than the parent. 

For more information on this and any further insights, you can search the beast users googlegroup  https://groups.google.com/g/beast-users for "negative branch length" as well. There are plenty of threads on this phenomenon.
I hope this helps,
Natalia

Jasmine Mah

unread,
Jan 3, 2021, 11:52:07 PM1/3/21
to revbayes-users
Hi Natalia,

Thanks - that's all really helpful! I had summarized my trees with mapTree using median heights. I'll try the other option -  mean heights. There's also an option to force negative branch lengths to be short but positive. Is this option designed to deal with negative branch lengths, or is it there for some other reason?

Cheers,
Jasmine

Natalia Chousou-Polydouri

unread,
Jan 4, 2021, 5:12:31 AM1/4/21
to revbayes-users
Hi Jasmine,
I have never used mapTree before, so I am not sure what this option is exactly, but it definitely sounds like it!
Natalia

Reply all
Reply to author
Forward
0 new messages