visualization of IQTree output

963 views
Skip to first unread message

tarakaramji M

unread,
Feb 23, 2018, 12:17:23 PM2/23/18
to The ETE toolkit
Dear Admin,

I am trying to visualize and convert my phylogenetic tree to PDF format displaying all the support values using ete3.
IQTree phylogenetic trees are different from Raxml tree as they have three support values like 100/1/100
I installed ete3 and used the following command

ete3 view -t treeedited.treefile

and the error is

ete3.parser.newick.NewickError: Unexpected newick format '100/1/100:0.154567' 
You may want to check other newick loading flags like 'format' or 'quoted_node_names'.

IQTree webserver somehow uses ete3 to visualize the tree.

Any help will be highly appreciated.

Thanks

Ramji

Jaime Huerta Cepas

unread,
Feb 26, 2018, 5:56:38 AM2/26/18
to eteto...@googlegroups.com
Hi Ramji, 
this is a very particular newick format. I see two solutions: 
1. parse the newick string with a regular expression that chooses which of the three values (100/1/100) is the one considered as branch support and therefore convert 100/1/100: into 1: 
2. Load the newick using format=1, which assumes that 100/1/100 is the name of the branch. You can then process the tree and iterate over nodes parsing the name string and loading support values manually. In example: 
tree = Tree("newick", format=1)
for node in tree: 
  if not node.is_leaf():
   node.support = float(node.name.split("/")[1])


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

Reply all
Reply to author
Forward
0 new messages