icytree
icytree copied to clipboard
Error for hybrid nodes with null branch length
When reading extended Newick, Icytree seems to fail when hybrid nodes have a 0 branch length. Below is a simple example, but this error seems to occur for all extended newick strings.
The following extended Newick string is displayed normally (see image)
((A/Pennsylvania/26/2017[&segments={0,1}]:0.5)ARGNode_jnx1q48i#H1[&segments={1}]:1.5,(A/Victoria/361/2011[&segments={0,1}]:2.,((ARGNode_jnx1q48i#H1[&segments={0}]:0.00000001,A/Victoria/686/2017[&segments={0,1}]:0.5)ARGNode_io6vA3je[&segments={0,1}]:0.5,A/PuertoRico/12/2017[&segments={0,1}]:1.)ARGNode_qeTNiqOc[&segments={0,1}]:1.0)ARGNode_loTXzrzb[&segments={1}]:0.0)ARGNode_6YMmGIKr[&segments={1}];
If the branch length above the second occurrence of node ARGNode_jnx1q48i#H1
is changed to exactly 0 instead of 0.00...001, icytree fails. Console log below:
Hi Pierre, thanks for letting me know about this.
The problem here is due to an interaction between the default option of "collapse zero-length edges" and the processing of hybrid nodes. You can work around the problem by disabling "collapse zero-length edges" from the style menu, which causes the network to be displayed properly. Obviously the problem shouldn't occur at all though, and I'll look into this when I have a chance.
Thanks again for bringing this up!