Phylogenetic tree annotation

I am facing difficulty in annotating the phylogenetic tree using ITOL. I am using 2019.7 version and I constructed tree using align-to-tree-mafft-fasttree: Build a phylogenetic tree using fasttree and mafft alignment pipeline. Then I used aligned sequence file generated from above pipeline to build phylogenetic tree using fasttree: Construct a phylogenetic tree with FastTree. method. I exported nwk file of the tree and visualized in ITOL. As ITOL can support qza file for annotation then I tried to annotate tree using taxonomy.qza and featuretable.qza files separately. But in both case ITOL is showing parsing error log as “couldn’t find ID … in the tree”. Thenafter, I filtered feature table using filter-table: Remove features from table if they’re not present in tree. method for annotating the tree but again same error was displayed. Please suggest me what is wrong with this method of annotation?
Thanks in anticipation.

Best Regards,

Hi @sanda,

Can you share the QZA files here? You can direct message me if you do not want to share them publicly. Otherwise have you tried using the Empress plugin?


Hi @SoilRotifer,
Thanks for your kind reply. Yes I will send to you.
Best Regards

Hi @sanda, I think I know what the issue is. Since you exported the tree from QIIME 2, the resulting newick file will have single-quotes around the tip label names. As these single-quotes do not appear in the taxonomy IDs, it will view these ID strings as different from those in the phylogeny (i.e. with vs without single-quotes). Thus registering a mismatch in ID labels between the tree and the taxonomy IDs. So, when you import this into iTOL, these single-quotes are not removed:


As iTOL has code specifically tailored to import QIIME 2 QZA files, these single quotes will be removed for you upon import. So, there is no need to export the newick file from QIIME 2 in order to view in iTOL. Just use the iTOL interface to select the qza file:

Note: I just imported the newick file you provided to me into QIIME 2 like this:

qiime tools import \
    --input-path /Users/mike/Downloads/fasttree.nwk \
    --output-path /Users/mike/Downloads/fasttree.qza \
    --type 'Phylogeny[Unrooted]' 

Now that I have uploaded the QZA file into iTOL, the tip labels in the tree will look like this (I am viewing in "Normal" Mode):


Now that I am viewing the tree in "Normal Mode" I can drag-drop your taxonomy file, taxonomy-based-on-filtered-tables3.qza onto the page. After a few moments I can see the following:

Viola! :mage:

Pro tip: you can also drag-drop your alignment and feature-tables onto the tree too.

iTOL is quite useful, but it tends to become sluggish on large data sets. I'd highly recommend checking out Empress.



Dear Prof. Robeson,
Thanks a lot for addressing this issue so quickly. I highly appreciate this. Its always feel great to get expert guidance from great scientists. Thanks once again.
Yes you are right regarding Empress, I have checked this too and I can get community plot that is very useful. My only concern is exporting high quality image with full legends. svg and png are the only available options there. How to do this?
Best Regards

One more query! as you mentioned about importing nwk file into Qiime2 using those commands. I don’t need to import nwk file. right? As I am having qza file of tree.

Correct there is not need fo you to re-import this. I did this in order to try finding a solution to your question. You can use the QZA tree file you generated. :slight_smile:

1 Like

I think the only options available are outlined here. Which I am sure you’re already aware. Often you can use image conversion programs to import / export different formats. Perhaps @yoshiki, @mortonjt, @sejsong, @wasade would have some insight here?

Thanks for bringing this up @SoilRotifer!

SVG is as high quality as it gets, as noted before you can use programs like GIMP or Adobe Illustrator (if you have access to it) to edit the file and export to any other format you care about.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.