How to convert .tre (phylogenetic tree file) to rooted_tree.qza file

Hi experts,

I am facing the problems to convert other files to .pza files to run in qiime2. I successfully converted otu.tsv to biom and then .qza file. However, to run alpha diversity, I need input the --i-phylogeny ARTIFACT (Phylogeny[Rooted] ) to run qiime diversity core-metrics-phylogenetic for alpha diversity analysis.

Could you suggest the way to convert the .tre file qza file.

I attached the .tre file for your reference,

Thank you so much,

Kind regards

Hi @lephuong07,

Prior to importing into :qiime2: you can root your tree using:

  • a phylogenetics / tree maniuplation package like
  • a tree viewer / editor to manually root your tree:

Otherwise we provide an option to mid-point root your tree after importing into QIIME 2. You can find out more in our Phylogenetic Inference Tutorial.

-Mike

1 Like

Hello Mike,

Thank you very much for your kind reply,
I would like to know to more about whether the converted .tre into qza file (by ete or ape) can be used in the
commandl line : "qiime diversity core-metrics-phylogenetic"

qiime diversity core-metrics-phylogenetic
--i-phylogeny rooted-tree.qza
--i-table table.qza
--p-sampling-depth 1109
--m-metadata-file sample-metadata.tsv
--output-dir core-metrics-results
My original .tre file can be found fromt this link: closed_reference.tre - Google Drive. Currently, I do not know how to import them into qiime2 with the format .qza. Additionally, could you check for whether this table is rooted or unrooted?

Thank you very much,

Kind regards,
Le Phuong.

Hi @lephuong07, you can import phylogenies by follow these instructions.

Yes, as long as the tool you are using outputs a standard newick formatted tree (all of them do as far as I know), you can import into QIIME 2. I noticed that you are using a closed-reference tree. These are typically already rooted. The skbio package is used to handle newick trees as outlined here.

You can import your unrooted tree, and apply a midpoint root follows:

qiime tools import \
    --input-path closed_reference.tre \
    --type 'Phylogeny[Unrooted]' \
    --output-path closed_reference.qza

qiime phylogeny midpoint-root \
    --i-tree closed_reference.qza \
    --o-rooted-tree closed_reference_mproot.qza 

Otherwise you can simply replace 'Phylogeny[Unrooted]' with 'Phylogeny[Rooted]' in the first command and move on to core-metrics-phylogenetic.

Wow,

Thank you so much for your precious time and and clear explanation, Mike. I am so happy. I think I can continue the qiime pipeline with your clear explanation.

Wish you have a nice day,

Le Phuong

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