Error while running adonis


I'm facing this error while running adonis with qiime2-2019.1 version. I attach the link of distance matrix file and metadata. The thing is that I can run this with vegan R package without a problem. Hope it helps better implementation of adonis!



adonis_meta.tsv (838.7 KB)

qiime diversity adonis
--i-distance-matrix ./data/analysis_set/core-metrics-results/bray_curtis_distance_matrix.qza
--m-metadata-file ./data/analysis_set/adonis_meta.tsv
--p-formula 'sex + hei2010_q_group'
--o-visualization ./data/analysis_set/core-metrics-results/bray_curtis-adonis.qzv

Verbose outputs:

Running external command line application. This may print messages to stdout and/or stderr.
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: run_adonis.R /scratch/tmp/joskim/tmpliae9izn/dm.tsv /scratch/tmp/joskim/tmpliae9izn/md.tsv sex + hei2010_q_group 999 1 /scratch/tmp/joskim/qiime2-temp-oz8__1j_/adonis.tsv

R version 3.4.1 (2017-06-30)
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-3
Error in G * t(hat) : non-conformable arrays
Calls: adonis -> sapply -> lapply -> FUN
Execution halted
Traceback (most recent call last):
File "/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/", line 274, in call
results = action(**arguments)
File "</nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/>", line 2, in adonis
File "/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/", line 231, in bound_callable
output_types, provenance)
File "/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/", line 427, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_beta/", line 365, in adonis
File "/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_beta/", line 391, in run_command, check=True)
File "/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_adonis.R', '/scratch/tmp/joskim/tmpliae9izn/dm.tsv', '/scratch/tmp/joskim/tmpliae9izn/md.tsv', 'sex + hei2010_q_group', '999', '1', '/scratch/tmp/joskim/qiime2-temp-oz8__1j
/adonis.tsv']' returned non-zero exit status 1.

1 Like

Hi @Josh_Hyungyum_Kim,
Thanks for reporting this error. The issue appears to be the many apostrophes you have in your metadata (Bachelor's degree) — the vegan-R script used by QIIME 2 was interpreting these as quotes, not as apostrophes, leading to empty rows in the data.

I have fixed this in the source code, and that fix will be available in this month’s release of QIIME 2 (2019.4). It sounds like you were able to bypass this, but for others who run into this problem with the 2019.1 release of QIIME 2: the easiest solution is just to remove apostrophes from your metadata (e.g., Bachelors degree instead of Bachelor's degree).


Thank you for the update!