error in rootatnode

56 views
Skip to first unread message

pok doo

unread,
Aug 25, 2022, 4:51:55 AM8/25/22
to PhyloNetworks users
Hi,
When i root the net3 an error showed up(net1 and net2 are OK), followed:
R(R57YH)DHEP748OWSK0N3J.png
Is there any problem with my data?
Thanks so much!
Jie

Cécile Ané

unread,
Aug 25, 2022, 9:53:44 AM8/25/22
to PhyloNetworks users
Hi Jie,

The problem is that your taxon "Aar" is the descendant of a hybrid node, so the root cannot be placed on the external edge going to Aar.
You should re-read your network, then plot it to see where is the hybrid node that's causing this problem.

The example below may be similar to what you have. It's a case when doing "rootatnode!(network, outgroup)" returned the same error you had, because the outgroup was just below a reticulation. But in this case, we can pick either one of the 2 hybrid edges above this reticulation to root the network. The plots below show the edge numbers, and we see that the hybrid edges parental to the hybrid node above the outgroup are numbered 9 (major) and 5 (minor).
"rootonedge!(network, 9)" worked fine to place the root on edge 9, and then the outgroup does look like an outgroup (plot on the right). If that edge had been below a reticulation, then the root could not have been placed on that edge, and the network would have been incompatible with the outgroup being an outgroup.

I hope it helps.


Screen Shot 2022-08-25 at 8.47.29 AM.png

Jie Liu

unread,
Aug 25, 2022, 11:17:03 PM8/25/22
to PhyloNetworks users
Dear Cécile,
Thanks so much for your reply.
It seems a little bit different in my error, the outgroup was not just below a reticulation.followed:
3159d4620a0129fa3a8a6096a1912dc.jpg
So which Node should i root will be ok ?
Thanks.
Jie

Cécile Ané

unread,
Aug 26, 2022, 9:58:47 AM8/26/22
to PhyloNetworks users
It looks like what's preventing rooting at Aar is the reticulation with inheritances 99.9% from edge 33 and 0.1% (γ=0.00119) from edge 3. With such a small inheritance γ (0.1%), you could possibly remove this reticulation? That would make it possible to root your network at Aar then.

To remove this reticulation, here is one option:
deleteHybridThreshold!(net3, 0.002)
This will modify your network "net3" and remove from it all minor edges with γ below 0.002. In your network, there's only 1 such minor reticulation edge.
After that, the re-rooting should work:
rootatnode!(net3, "Aar")

If you estimated this network with SNaQ, you could look into the ".networks" output file: this file should list other alternative networks with flipped directions for the various reticulations. One of them would have the gene flow along edge 3 going in the other direction. The output file should give you the score for these other network (with flipped direction of gene flow), and the networks are listed in the order of their scores. Some times, the score is very similar when we flip the direction of an edge. So you could read the second network listed in this file (on the 2nd line), and see if its score is close to the score of the best network ("net3", first network in the file, 1st line). If so, plot it: it may be the network with this γ=0.00119 small gene flow flipped, and it would be possible to root it at Aar. That might be an option, other than simply deleting this reticulation with γ=0.00119.

Jie Liu

unread,
Aug 28, 2022, 8:52:27 AM8/28/22
to PhyloNetworks users
Dear Cécile,
Thanks so much for your help.
I have solved the problem by taking your advise.
Best.
Jie
Reply all
Reply to author
Forward
0 new messages