Hi there,
I am trying to load a treefile with ete3 using the following:
from ete3 import Tree
t=Tree("ROOT_LGM60.treefile")
However, when I do this, I get the following error messages:
Traceback (most recent call last):
File "C:/Users/kelse/OneDrive/Documents/Script_Test/leaf_rename.py", line 11, in <module>
t=Tree('ROOT_LGM60.treefile', format=0)
File "C:\Users\kelse\Anaconda3\lib\site-packages\ete3\coretype\tree.py", line 213, in __init__
quoted_names=quoted_node_names)
File "C:\Users\kelse\Anaconda3\lib\site-packages\ete3\parser\newick.py", line 266, in read_newick
return _read_newick_from_string(nw, root_node, matcher, format, quoted_names)
File "C:\Users\kelse\Anaconda3\lib\site-packages\ete3\parser\newick.py", line 341, in _read_newick_from_string
_read_node_data(closing_internal, current_parent, "internal", matcher, formatcode)
File "C:\Users\kelse\Anaconda3\lib\site-packages\ete3\parser\newick.py", line 445, in _read_node_data
raise NewickError("Unexpected newick format '%s' " %subnw[0:50])
ete3.parser.newick.NewickError: Unexpected newick format '100/100:0.1675844217'
You may want to check other newick loading flags like 'format' or 'quoted_node_names'.
I think it is having an issue with the support values, but I am not sure. This tree was generated using IQ-TREE with aLRT/UFBOOT support. Here is an portion of what the treefile itself looks like:
(0:0.3740934650,(((((((((((1:0.5940078752,46:0.4962741857)100/100:0.1675844217,57:0.6477068763)30.7/67:0.0400940719,88:0.5505298303) ...and so on.
Any help with how to fix this would be appreciated!
Thanks, Kelsey
Thank you! This solved the problem