Error when running Ghost tree

Hi,
I’m having the same problem when I use the diversity plugin. I am analyzing ITS readings that particularly do not show problems to merge, but the use of ghost-tree sounds very interesting and I would like to compare its diversity results with a FastTree generated tree.

I’ve tried the Method 2 from the tutorial and I managed to make a ghost-tree with Silva 138 and UNITE 2020-02-20 release but I couldn’t root it neither with qiime phylogeny midpoint-root nor with midpoint.root function on r (‘phytools’ package).

The former gives the following error:

Traceback (most recent call last):
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in midpoint_root
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 199, in bound_callable
self.signature.check_types(**user_input)
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/core/type/signature.py”, line 299, in check_types
“subtype of %r.” % (name, spec.qiime_type))

  Plugin error from phylogeny:

  Argument to parameter 'tree' is not a subtype of Phylogeny[Unrooted].

The latter:

  Error in double(nm * nm) : vector size cannot be NA
  In addition: Warning message:
  In nm * nm : NAs produced by integer overflow

Here is the artifact of my first ghost-tree: ghost-tree-foundation-allignment-80-otus.qza (1.2 MB) (also happens at 90% and 100% similarity. I’d like to compare those too)

I tried re-importing the tree as suggested in this post but didn’t work.

Finally, I decided to generate the ghost tree using a pre- and non-pre rooted foundation .nwk tree with the following command:
qiime ghost-tree scaffold-hybrid-tree-foundation-tree
> --i-otu-map extensions_otu_map_80.qza
> --i-extension-taxonomy sh_taxonomy_qiime_ver8_dynamic_s_04.02.2020.qza
> --i-extension-sequences sh_refs_qiime_ver8_dynamic_s_04.02.2020.qza
> --i-foundation-tree tree-tax_slv_ssu_138.qza
> --i-foundation-taxonomy taxonomy_foundation.qza
> --o-ghost-tree ghost-tree-foundation-tree-80-otus.qza

but sandly I received the following error:

Traceback (most recent call last):
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in scaffold_hybrid_tree_foundation_tree
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 362, in callable_executor
output_views = self._callable(**view_args)
File “/slowdata/smcgreig/q2-ghost-tree/q2_ghost_tree/_scaffold_hybrid_tree_foundation_tree.py”, line 49, in scaffold_hybrid_tree_foundation_tree
foundation_taxonomy_fh)[0]
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/ghosttree/scaffold/hybridtree.py”, line 116, in extensions_onto_foundation
graft_letter, foundation_taxonomy)
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/ghosttree/scaffold/hybridtree.py”, line 275, in _make_nr_foundation_newick
sheared_tree = foundation_tree.shear(foundation_unique_accessions)
File “/home/qiime/miniconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/skbio/tree/_tree.py”, line 468, in shear
node.parent.remove(node)
AttributeError: ‘NoneType’ object has no attribute ‘remove’

Plugin error from ghost-tree:

‘NoneType’ object has no attribute ‘remove’

Here are the artifacts used there: extensions_otu_map_80.qza (790.4 KB) sh_refs_qiime_ver8_dynamic_s_04.02.2020.qza (7.6 MB) sh_taxonomy_qiime_ver8_dynamic_s_04.02.2020.qza (1.4 MB) taxonomy_foundation.qza (117.9 KB) tree-tax_slv_ssu_138.qza (28.6 KB) .

I’m no more than a very beginner in bioinformatics and I ran out of ideas. I hope I’ve been clear enough.
Thank you very much for any help and thank you for developing this interesting tool. I hope the errors are caused by a mistake I’ve done.

1 Like

Hello @MatiasF_H,

Welcome to the forums! :qiime2:

Thanks for posting your full log files, along with your .qza files. I think you are running the right commands, but let’s see if @Jennifer_Fouquier has any recommendations. :deciduous_tree: :evergreen_tree:

Colin
P.S. I’ve moved your post to a new thread so we can track it better.

Hi @colinbrislawn,
thanks for the welcome and taking care of the post.
Looking forward to hearing from @Jennifer_Fouquier

M

2 Likes

Hi there! Thanks for the detailed write up. Sorry you’re having trouble. I will try to get to this in a few days but there is a chance I will not be able to get to this until after Tuesday because I have a talk and other things to prepare for that require a lot of time. :grinning:

-Jennifer

Hi Jennifer,
thank you very much for your time.
I just want to point out that I skipped the filter step of SILVA alignments for the creation of the ghost-tree I uploaded above, but unfortunately that wasn’t the problem. Here is the new ghost-tree artifact: ghost-tree-foundation-allignment-80-otus.qza (1.2 MB)

Best,
Matias

1 Like