How can I import a rooted-tree?

Hi, I have built a rooted tree with other program. How can I import it with .tre file into qiime 2 format .qza to do diversity analyses? I found there is only a way to import unrooted tree in “importing data”. Thanks!

Hi @liubaily! You can import a tre file representing a rooted tree by running something like the following:

 qiime tools import \
  --input-path tree.tre \
  --output-path my-rooted-tree.qza \
  --type 'Phylogeny[Rooted]'

A few things to point out - this should look pretty similar to the importing doc for an unrooted tree - importing data in QIIME 2 generally takes on the same type of command, with minor variations. The important thing here is that the --input-path references the file with your rooted tree, and that the --type is set to a Rooted Phylogeny, instead of Unrooted. This is how QIIME 2 knows the difference between the two, and helps you make good decisions throughout your analysis! Make sense? Thanks! :t_rex:

1 Like

Thanks @thermokarst! That’s really helpful!

1 Like

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