Problem using a ghost-tree for diversity analysis

Im trying to use a phylogentic tree generated using the ghost-tree plugin for core diversity analysis, but im geting the next message:

Plugin error from diversity:

  ``tree`` must be rooted.

Debug info has been saved to /tmp/qiime2-q2cli-err-24035sav.log

Then i try to import the tree as unrooted and then root it using phylogeny midpoint-root, but i get the same messge.

When i check the debug info i get this:

Traceback (most recent call last):
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/", line 327, in __call__
    results = action(**arguments)
  File "</usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/>", line 2, in core_metric$  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/", line 240, in bound_callable
    output_types, provenance)
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/", line 477, in _callable_executor_
    outputs = self._callable(scope.ctx, **view_args)
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/", line 55, in core_metrics_$    metric='faith_pd')
  File "</usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/>", line 2, in alpha_phylo$  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/", line 240, in bound_callable
    output_types, provenance)
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/", line 383, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_alpha/", line 54, in alpha_phylog$    tree=phylogeny)
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/diversity/", line 170, in alpha_diversity
    counts, otu_ids, tree, validate, single_sample=False)
  File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/diversity/alpha/", line 136, in _setup_$    _validate_otu_ids_and_tree(counts[0], otu_ids, tree)
  **File "/usr/local/bioconda/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/diversity/", line 79, in _validate_otu_ids_$    raise ValueError("``tree`` must be rooted.")**
**ValueError: ``tree`` must be rooted.**

if some one could help me wold be awesome

1 Like

Hi there!

I’m sorry you’re getting this error. I’ve run into similar problems with rooting not being recognized. Can you please attach the file or send it to [email protected]? Also, this week is a bit busy for me so I apologize if there are any delays, but I will get to this as fast as I can. Thank you!



Sorry for the delayed answer. Here are the files and i'll aslo sen the files to your mail.

Have a nice day and thank you for the help!!

ghost-tree-foundation-allignment-90-otus.qza (296.8 KB) ghost-tree-midpoint-root.qza (239.3 KB) ghost-tree-unrooted.qza (234.7 KB) tree.nwk (441.7 KB)


This has been addressed with Emanuel, but I need to follow up here on the forum with a brief solution summary soon. Thanks for the reminder! @Mehrbod_Estaki & @thermokarst


A post was split to a new topic: Error when running Ghost tree