Qiime 2 Diversity Adonis Error

Hi. I am running adonis with qiime2-2019.7. I have run the lines below:

$ qiime diversity adonis \

--i-distance-matrix beta-gut-uw-5per.qza
--m-metadata-file metadata-gut-5per.csv
--p-formula Diet
--o-visualization permanova-gut-uw-5per-diet.qzv
--verbose

But I am receiving this common error, and the log file says:
Error in G * t(hat) : non-conformable arrays
Calls: adonis -> sapply -> lapply -> FUN
Execution halted
Traceback (most recent call last):
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py", line 327, in call
results = action(**arguments)
File "</home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-432>", line 2, in adonis
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
output_types, provenance)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 445, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py", line 367, in adonis
_run_command(cmd)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py", line 393, in _run_command
subprocess.run(cmd, check=True)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_adonis.R', '/tmp/tmpzlvn8ktm/dm.tsv', '/tmp/tmpzlvn8ktm/md.tsv', 'Diet', '999', '1', '/tmp/qiime2-temp-fxgvmtum/adonis.tsv']' returned non-zero exit status 1.

I've verified my metadata with Keemei and found no problems. I'm also using the 1st column and row name as "SampleID". How do I solve this problem to run adonis without this error?

Thank you in advance!

If it helps, I've attached the 2 input files:
beta-gut-uw-5per.qza (7.2 MB)
metadata-gut-5per.csv (126.0 KB)

Good afternoon YinXun,

The “non-conformable arrays” error can happen if there are missing values in your metadata.

I took a look and noticed that the Diet column has some blank cells in it. If you filter these out then rebuild your distance matrix, the adonis test should work!

Or, you could replace the blank cells with “Unknown”, then filter out people with Unknown Diets.

Let me know if that makes sense!
Colin

2 Likes

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