# Tree visualization

**URL:** https://forum.qiime2.org/t/tree-visualization/1866
**Category:** User Support
**Tags:** tree
**Created:** [November 16, 2017, 3:23am UTC](https://forum.qiime2.org/t/tree-visualization/1866 "2017-11-16T03:23:48Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Lu\_Yang](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Lu\_Yang](https://forum.qiime2.org/u/Lu_Yang)
#### Post date: [November 16, 2017, 3:23am UTC](https://forum.qiime2.org/t/tree-visualization/1866/1 "2017-11-16T03:23:48Z")

</div>

Hi,  
I got the rooted.tree from qiime2, but it is a qza file. May I know how to change it into a qzv file, which can be visualized. OR change the qza file into a fasta file, which I can know the reads and draw a tree? Because all the qza file is not readable.  
Thanks so much.

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [November 17, 2017, 2:56pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/3 "2017-11-17T14:56:39Z")

</div>

Hi @Lu_Yang! Unfortunately we don't have any tree-viewing visualizations at this moment, but you can[export your tree](https://docs.qiime2.org/2017.10/tutorials/exporting/#exporting-a-phylogenetic-tree) artifact and load that file up into the viewer of your choice! 🎄 🌳 🌲 🌴 Let us know how it goes for you! Thanks! 🦖

---

<div class="post-metadata">

### Author: ![Lu\_Yang](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Lu\_Yang](https://forum.qiime2.org/u/Lu_Yang)
#### Post date: [November 17, 2017, 3:26pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/5 "2017-11-17T15:26:24Z")

</div>

Hi, @thermokarst,  
Thanks for your reply. Got that! Looking forward to qiime2's visualization of the tree. Haha ~:grin:🤪😊🤩

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [November 17, 2017, 4:38pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/6 "2017-11-17T16:38:43Z")

</div>

An off-topic reply has been split into a new topic: [How do I create a tree from a subset of samples?](https://forum.qiime2.org/t/how-do-i-create-a-tree-from-a-subset-of-samples/1885)

Please keep replies on-topic in the future.

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 1, 2017, 8:29pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/7 "2017-12-01T20:29:09Z")

</div>

Hi, thermokarst

I understand that Qimme2 cannot visualize rooted-tree.qza. So, I exported the rooted-tree.qza into a tree.nwk, which can be visualised as a tree. Obviously, this tree is built based on the rep sequences. So, instead of my Sample ID, hashed code for each rep sequence is present on the node of the tree.

My question is that if there is a file that contains information about all the matches between the hash codes and rep sequences? If so, where it can be found?

Bests

Dr yan

---

<div class="post-metadata">

### Author: ![Lu\_Yang](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Lu\_Yang](https://forum.qiime2.org/u/Lu_Yang)
#### Post date: [December 1, 2017, 10:31pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/9 "2017-12-01T22:31:29Z")

</div>

Hi, @zejunyan,

I had the same problem as you before. Then I found a way out. I visualize the tree on this website. [https://itol.embl.de/](https://itol.embl.de/)  
I downloaded the taxonomy file, and save it as a txt file. And input the taxonomy file into the tree based on the module they provide.  
Hope this can help you.  
Good luck!

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 1, 2017, 10:58pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/10 "2017-12-01T22:58:51Z")

</div>

Hi, @Lu_Yang

Thank you for your reply. I tried your idea, it worked to give me a tree. But, the nodes are stilled labelled with hash code, but not my sample ID. So, I cannot read out useful info from this tree. Do you know how the nodes in the tree can be labelled with my Sample IDs?

Thanks

Dr Yan

---

<div class="post-metadata">

### Author: ![Lu\_Yang](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Lu\_Yang](https://forum.qiime2.org/u/Lu_Yang)
#### Post date: [December 1, 2017, 11:07pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/11 "2017-12-01T23:07:40Z")

</div>

Hi, @zejunyan,

I am so sorry that I haven't tried the sample ID label. I just tried the taxonomy table. Because for my understanding what the harsh codes you mentioned are the feature ID, each feature ID can only be represented by the taxonomy.  
I think the sample ID labels you mentioned are another visualization method. But I am sorry that I have no idea about that kind of visualization. If you figure out, pls let me know.😊  
Good luck.

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 1, 2017, 11:23pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/12 "2017-12-01T23:23:08Z")

</div>

Hi, @Lu_Yang

Thank you for your quick response.

I think if we know how ro match each feature ID (i.e. the hash code) to its corresponding sampleID, we can just replace the feature ID with the sample ID, after which, a tree can be drawn with sample ID labelled. My problem is that how to find the match between feature ID and sampleID? Is there a file containing this info?

Cheers

Dr yan

---

<div class="post-metadata">

### Author: ![Lu\_Yang](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Lu\_Yang](https://forum.qiime2.org/u/Lu_Yang)
#### Post date: [December 4, 2017, 3:28am UTC](https://forum.qiime2.org/t/tree-visualization/1866/13 "2017-12-04T03:28:24Z")

</div>

Hi, @zejunyan,

I am sorry that I just use one sample to map the tree. Not all samples. Let's wait for @thermokarst reply.  
Good luck!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 4, 2017, 3:44pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/14 "2017-12-04T15:44:52Z")

</div>

> [@zejunyan](#):
>
> My question is that if there is a file that contains information about all the matches between the hash codes and rep sequences? If so, where it can be found?

You can [`tabulate-seqs`](https://docs.qiime2.org/2017.11/plugins/available/feature-table/tabulate-seqs/) to determine which sequence belongs to which Feature ID.

> [@zejunyan](#):
>
> But, the nodes are stilled labelled with hash code, but not my sample ID

Perhaps you mean "Feature ID" instead of "Sample ID"? The sequences used to generate this tree are per-feature, and features can show up in many different samples.

There is an option when running [`q2-deblur`](https://docs.qiime2.org/2017.11/plugins/available/deblur/denoise-16S/) and [`q2-dada2`](https://docs.qiime2.org/2017.11/plugins/available/dada2/denoise-paired/) to disable feature-hashing: `--p-no-hashed-feature-ids`, but this would require you to re-run your denoising/quality-control step. Would that work for you?

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 4, 2017, 4:41pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/16 "2017-12-04T16:41:14Z")

</div>

@thermokarst

Thank you for you reply.

What I mean is that how I can match each feature ID with my SampleID, but not with my sequences.

Cheers

Dr yan

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 4, 2017, 4:42pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/17 "2017-12-04T16:42:27Z")

</div>

I have tried --p-no-hashed-feature-ids, it gave me the corresponding sequence of each feature ID, but not my sample ID

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 4, 2017, 4:43pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/18 "2017-12-04T16:43:12Z")

</div>

@thermokarst  
I have tried --p-no-hashed-feature-ids, it gave me the corresponding sequence of each feature ID, but not my sample ID

---

<div class="post-metadata">

### Author: ![Jaroslaw\_Grzadziel](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/8dc957/32.png) [@Jaroslaw\_Grzadziel](https://forum.qiime2.org/u/Jaroslaw_Grzadziel)
#### Post date: [December 5, 2017, 4:02am UTC](https://forum.qiime2.org/t/tree-visualization/1866/20 "2017-12-05T04:02:43Z")

</div>

There is any option to create a tree including either NCBI IDs or taxa names ? Hash code isn't very informative for further analyis. If so, can anyone give a clue ?  
Thanks 🙂

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 6, 2017, 9:39pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/21 "2017-12-06T21:39:39Z")

</div>

Hi @zejunyan, the relationship between features and samples are what are represented in the feature table, not the aligned sequences (which are used to create a phylogenetic tree). We don't have any functionality in QIIME 2 (that I can think of) that would allow you to relabel your features with arbitrary labels (in your case, you want to map them to samples, I think). Can you please confirm this, and let me know if we are on the same page? If so, I will create an issue to put this kind of relabeling on our radar. Thanks! 🦖

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 6, 2017, 9:40pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/22 "2017-12-06T21:40:33Z")

</div>

@Jaroslaw_Grzadziel, can you please review [my response here](https://forum.qiime2.org/t/tree-visualization/1866/21), and provide confirmation as well? Thanks!

---

<div class="post-metadata">

### Author: ![Jaroslaw\_Grzadziel](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/8dc957/32.png) [@Jaroslaw\_Grzadziel](https://forum.qiime2.org/u/Jaroslaw_Grzadziel)
#### Post date: [December 7, 2017, 8:18am UTC](https://forum.qiime2.org/t/tree-visualization/1866/24 "2017-12-07T08:18:37Z")

</div>

> [@thermokarst](#):
>
> We don’t have any functionality in QIIME 2 (that I can think of) that would allow you to relabel your features with arbitrary labels (in your case, you want to map them to samples, I think)

I mean that instead of hash ID it would be great to assing taxonomic ID (for example taxon name or somehow NCBI ID, greengenes ID etc.)

The example below is the tree in newick format generated in q2, the visualization (here in [https://itol.embl.de/](https://itol.embl.de/)) is great but without taxonomic ID's is almos useless.

 ![S4iOgJEwavFMN5IQcL-ojA](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/1X/f1c2d5572a229b30f9a924b8ffba1e38dd966fb4.jpg)

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 7, 2017, 11:02am UTC](https://forum.qiime2.org/t/tree-visualization/1866/25 "2017-12-07T11:02:08Z")

</div>

@thermokarst

Thank you for your reply.

Yes, I would like to draw the phylogenetic tree (UPGMA) labelled with my Sample IDs. This can be done in Qiime 1 through pick\_de\_novo\_otus.py workfolw. However, this pipeline is very computationally costing when dealing with a large input.

Bests

Dr yan

---

<div class="post-metadata">

### Author: ![zejunyan](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zejunyan](https://forum.qiime2.org/u/zejunyan)
#### Post date: [December 7, 2017, 4:12pm UTC](https://forum.qiime2.org/t/tree-visualization/1866/26 "2017-12-07T16:12:28Z")

</div>

@thermokarst

Is there a file that contain information about which sample feature IDs belong to during Qiime2 analysis?  
Because I can find the masked-aligned-rep-seqs.fasta file, if I can have another file storing information about which sample the feature IDs in this masked-aligned-rep-seqs.fasta file belong to, i should be able to draw a tree based on sample\_IDs.

Bests

Dr yan

[Next page](https://forum.qiime2.org/t/tree-visualization/1866.md?page=2)
