Tree visualization

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

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/
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!

2 Likes

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

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.:blush:
Good luck.

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

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!

You can tabulate-seqs to determine which sequence belongs to which Feature 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 and q2-dada2 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?

@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

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

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

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 :slight_smile:

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! :t_rex:

@Jaroslaw_Grzadziel, can you please review my response here, and provide confirmation as well? Thanks!

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/) is great but without taxonomic ID’s is almos useless.

@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

@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

Yes, as I mentioned above, this is your FeatureTable.

Sounds like you are on your way to coming up with a way to accomplish this visualization outside of QIIME 2, which is what I was going to recommend to you here anyway. What you are trying to view is not supported by QIIME 2 at present, and we don’t have plans to implement this in the near future.

Have you had a look at feature-table heatmap? While not UPGMA, this does support clustering on the sample and feature axes, independently. You have the option to annotate metadata, too.


If you have any further questions, I think it would make sense to ask those in a new Topic (or Topics) on the Forum. Thanks!

1 Like

Great viz! We don’t yet support viewing a phylogenetic tree like this in QIIME 2, but if we did, we would most likely allow for users to provide metadata to annotate the labels with. Since taxonomy is viewable as metadata in QIIME 2, that means you could relabel with taxonomy strings just as easily as any other type of metadata.

Since we don’t support this type of visualization yet, you will need to export your tree and your taxonomy and merge those yourself, possibly with the aid of some tree-viewer program.

1 Like

An off-topic reply has been split into a new topic: Loading Greengenes tree in iTOL

Please keep replies on-topic in the future.

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