Taxonomic annotation for a .tre file

61 views
Skip to first unread message

Yang

unread,
Aug 18, 2016, 6:45:08 PM8/18/16
to Qiime 1 Forum
Hi,

I have a .tre file generated from QIIME. But the tip labels are named in a set of numbers. How can I find the taxonomic annotation for each leaf?

Thanks a lot for your help!

Best,
Yang

Colin Brislawn

unread,
Aug 19, 2016, 1:23:41 PM8/19/16
to Qiime 1 Forum
Hello Yang,

This tip names of a .tre file match up with the OTU IDs in your .biom file, and OTU IDs in your rep_set.fna file. If you have a .biom file, it may already have the taxonomy of these IDs. If you have a rep_set.fna file, you can find taxonomy by running one of the assign_tax.py scripts. 

Let me know what other files you have, and I can help you 'connect the dots' between OTU IDs and taxonomic annotations.

Colin

Yang

unread,
Aug 19, 2016, 5:17:06 PM8/19/16
to Qiime 1 Forum
Hi, Colin,

Thanks a lot for your help!

The files I have include: a .biom file with about 1,000 taxa, a .tre file with more than 10,000 tips which, I think, is not from the same process as .biom file, and a .fa sequencing file (but it is not rep_set.fna file). 

My purpose is to select the corresponding taxa in .biom file from .tre file. 

Here are my questions:
1) If the .biom file and .tre file are from the different process, are the OTU IDs in the two files are consistent? They are from the same sequencing data though.
2) Can QIIME process .fa file? 
3) I am using QIIME virtual box. I just updated ubuntu and then QIIME desktop disappeared and I cannot mount my shared folder any more.

Please advice! Thank you!

Thanks,
Yang

Jai Ram Rideout

unread,
Aug 19, 2016, 7:55:45 PM8/19/16
to Qiime 1 Forum
Hi Yang,

1) If the .biom file and .tre file are from the different process, are the OTU IDs in the two files are consistent? They are from the same sequencing data though.

What version of QIIME was used to generate these files, and what were the exact commands you ran? We'll be able to better help you match up your data with these details.

2) Can QIIME process .fa file?

It depends on what scripts you're running on your .fa file. QIIME usually doesn't care about the file format extension (I'm assuming your .fa file is in FASTA format), though some scripts do.

3) I am using QIIME virtual box. I just updated ubuntu and then QIIME desktop disappeared and I cannot mount my shared folder any more.

I'm not sure how to recover from that. The VirtualBox Ubuntu will be very outdated because it hasn't been updated since the last release, which was several months ago. We most likely won't be able to help you debug this because I'm sure hundreds of packages were updated and we have no way of knowing how that will affect the QIIME installation. I recommend downloading and using a fresh copy of the QIIME VirtualBox, and avoid updating Ubuntu.

Best,
Jai

Yang

unread,
Aug 22, 2016, 2:14:57 PM8/22/16
to Qiime 1 Forum
Hi, Jai,

I am sorry I don't have any details or scripts about those files. I received these 3 files from somewhere else. It is very difficult for me to request any information. That is why I am trying to figure a way out. And I am very new on this.

What I know (guess) is .biom file and .tre file are from the same sequencing file with different filtering process. Thus, .biom file has more than 1,000 taxa but .tre file has 11,000 tips. The OTU IDs of .biom file ranges from 1 to 1,700, however the label names of .tre file ranges from 0 to 11,000. Are there any chance those numbers can be matched? I am so sorry for this little information and I am really appreciating for your help!

If they cannot be matched, I guess my next step will be to reinstall QIIME virtual box and try on .fa sequencing file.

Please advice! Thanks a lot!

Best,
Yang

  





Colin Brislawn

unread,
Aug 22, 2016, 3:10:22 PM8/22/16
to Qiime 1 Forum
Hello Yang,

Thanks for telling me more! Can you post for me the first 200 chacaters of the .tre file using this command:
head -c 200 tree_file_name.tre

I'm guessing that the .tre file they sent you is just the default GreenGenes tree. This means that you can match up all the closed-ref OTU to tips of the tree using their shared ID. 

If you still have the list of OTU centroids in a file like, rep_set.fna, it's also pretty simple to build your own tree using qiime. 

Colin

TonyWalters

unread,
Aug 22, 2016, 3:23:21 PM8/22/16
to Qiime 1 Forum
Hi Yang,

If you want to create a tree that has tip IDs converted to taxonomy strings, there isn't a built in way to do so, but there is a custom script (that hopefully still works) that takes an OTU table, from which it pulls the taxonomy strings, and a tree file, and it matches up the OTU ids from the table and tree to create a tree with taxonomy strings for the tips:

https://gist.github.com/walterst/17d9e777e6b8cadb9546

Note that this tree would not work within QIIME, which expects IDs to match up between the OTU table and tree, but you could display the tree in other programs. Dendroscope can handle very large trees but has limited options. You may be able to open large trees in other programs too.

Yang

unread,
Aug 23, 2016, 1:54:57 AM8/23/16
to Qiime 1 Forum
Hi, Colin,

Here are the first 200 characters of the .tre file:

(4873:8.57033291874e-07,((7024:0.00840845286233,(7543:0.069531773607,((6985:0.0439477451128,(((((10317:8.57033291874e-07,((((11359:0.00837083937312,7343:0.00833174719018):0.00833392744583,((9176:0.016


Unfortunately, I don't have rep_set.fna file. What can I do to match up the tips using the shared ID, if they are using the default GreenGenes tree (hopefully)? Thank you so so much for your help!


Best,

Yang 

Yang

unread,
Aug 23, 2016, 2:00:35 AM8/23/16
to Qiime 1 Forum
Hi, Tony,

Thanks a lot for this script! It would be very helpful! I will try it. Thank you~

Best,
Yang
Reply all
Reply to author
Forward
0 new messages