Plugin error from diversity: Invalid shape in axis 0

Hello,

I have been following the moving pictures tutorial with my own data and everything worked fine until I reached the core-metrics-step.

qiime diversity core-metrics-phylogenetic
--i-phylogeny rooted-tree.qza
--i-table /Users/administrator/Desktop/skin3/filtered_table.qza
--p-sampling-depth 40000
--m-metadata-file sample-metadata.tsv
--output-dir core-metrics-results

Plugin error from diversity:

Invalid shape in axis 0: 0.

Debug info has been saved to /var/folders/lh/ld9r0p7s3p357m6kcksvv4j00000gp/T/qiime2-q2cli-err-ds90x_md.log

I already tried the qiime fragment-insertion filter-features Option to clean sequences from the table which are not present in my tree, yet I experience this error.
What does it mean?

The problems seems to be the rooted-tree, since I can calculate shannon's diversity with the table.qza and checked the metadata-file for errors.

How can I check my rooted-tree for errors? In fact, I only have one sample/ sequence so far in my pipeline - could this be the error?

Thank you very much in advance!

Hi @e_flat_minor,
We cannot tell where this error is coming from if you do not include the full error message (see the log file, or use the --verbose flag when running commands to generate the full error message in your terminal). But your description makes the problem pretty clear (I think).

You could use qiime tools export to export to newick, then check with a text editor. I am not sure the tree is the issue, though. See below:

That is probably the problem. Many of the analyses in the core-metrics pipeline really only make sense if you have multiple samples, so I would discourage you from using this action (even if we debugged this specific issue, you will run into others).

Good luck!

Hello @Nicholas_Bokulich,

thank you for your reply. Verbose gives me this error log (see below). I think you are right - e.g. calculating beta-diversity is impossible with only one sample. I will retry once I collected more sequences.

Thank you for your helpful reply.

/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/sklearn/utils/validation.py:595: DataConversionWarning: Data with input dtype float64 was converted to bool by check_pairwise_arrays.
warnings.warn(msg, DataConversionWarning)
/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:188: RuntimeWarning: invalid value encountered in true_divide
proportion_explained = eigvals / sum_eigenvalues
/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/emperor/core.py:614: RuntimeWarning: invalid value encountered in true_divide
c_data = (coords / np.max(np.abs(coords)))
Traceback (most recent call last):
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py", line 274, in call
results = action(**arguments)
File "</Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-375>", line 2, in core_metrics_phylogenetic
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 231, in bound_callable
output_types, provenance)
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 458, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_core_metrics.py", line 59, in core_metrics_phylogenetic
metric='unweighted_unifrac', n_jobs=n_jobs)
File "</Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-465>", line 2, in beta_phylogenetic
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 231, in bound_callable
output_types, provenance)
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 365, in callable_executor
output_views = self._callable(**view_args)
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_beta/_method.py", line 105, in beta_phylogenetic
variance_adjusted=variance_adjusted, bypass_tips=bypass_tips)
File "/Users/administrator/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/unifrac/_methods.py", line 103, in unweighted
variance_adjusted, 1.0, bypass_tips, threads)
File "unifrac/_api.pyx", line 83, in unifrac._api.ssu
File "stringsource", line 251, in View.MemoryView.array_cwrapper
File "stringsource", line 153, in View.MemoryView.array.cinit
ValueError: Invalid shape in axis 0: 0.

Plugin error from diversity:

Invalid shape in axis 0: 0.

See above for debug info.

1 Like

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