Error while running adonis

(Josh Hyungyum Kim) #1

Hi,

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!

Regards,

Josh

https://drive.google.com/open?id=17RccE_JTivCZHvwp4efJMIXBB67Q2FFC

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

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/commands.py”, line 274, in call
results = action(**arguments)
File “</nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-417>”, line 2, in adonis
File “/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, 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/_visualizer.py”, line 365, in adonis
_run_command(cmd)
File “/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py”, line 391, in run_command
subprocess.run(cmd, check=True)
File “/nfs/home/joskim/miniconda3/envs/qiime2-2019.1/lib/python3.6/subprocess.py”, 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

(Nicholas Bokulich) #2

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).

2 Likes

(Josh Hyungyum Kim) #3

Thank you for the update!

0 Likes