Adonis run error

Hi,
We stumbled upon an error message while running the following codes for "Adonis" on a Jupyter notebook:

from qiime2.plugins.diversity.visualizers import adonis
adonis = adonis(beta_diversity_dist, metadata, formula = "Temp+pH")
adonis.visualization

And here is the error message:

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 /tmp/tmpmhqfyrnm/dm.tsv /tmp/tmpmhqfyrnm/md.tsv Temp+pH 999 1 /tmp/qiime2-temp-a7ugxr7p/adonis.tsv


CalledProcessError Traceback (most recent call last)
in
1 from qiime2.plugins.diversity.visualizers import adonis
----> 2 adonis = adonis(beta_diversity_dist, metadata, formula = "Temp+pH")
3 adonis.visualization

</home/bsen/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-427> in adonis(distance_matrix, metadata, formula, permutations, n_jobs)

~/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py in bound_callable(*args, **kwargs)
229 # Execute
230 outputs = self.callable_executor(scope, callable_args,
--> 231 output_types, provenance)
232
233 if len(outputs) != len(self.signature.outputs):

~/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py in callable_executor(self, scope, view_args, output_types, provenance)
425 # will also need to be updated to support OutPath instead of str.
426 with tempfile.TemporaryDirectory(prefix='qiime2-temp-') as temp_dir:
--> 427 ret_val = self._callable(output_dir=temp_dir, **view_args)
428 if ret_val is not None:
429 raise TypeError(

~/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py in adonis(output_dir, distance_matrix, metadata, formula, permutations, n_jobs)
363 cmd = ['run_adonis.R', dm_fp, md_fp, formula, str(permutations),
364 str(n_jobs), results_fp]
--> 365 _run_command(cmd)
366
367 # Visualize results

~/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py in _run_command(cmd, verbose)
389 print("\nCommand:", end=' ')
390 print(" ".join(cmd), end='\n\n')
--> 391 subprocess.run(cmd, check=True)

~/anaconda3/envs/qiime2-2019.1/lib/python3.6/subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
416 if check and retcode:
417 raise CalledProcessError(retcode, process.args,
--> 418 output=stdout, stderr=stderr)
419 return CompletedProcess(process.args, retcode, stdout, stderr)
420

CalledProcessError: Command '['run_adonis.R', '/tmp/tmpmhqfyrnm/dm.tsv', '/tmp/tmpmhqfyrnm/md.tsv', 'Temp+pH', '999', '1', '/tmp/qiime2-temp-a7ugxr7p/adonis.tsv']' returned non-zero exit status 1.

System specification: Qiime2.2019.1, Windows-subsystem-Linux.
Any solution, pl.
Thanks in advance!

It looks like the underlying adonis call failed here - would you be able to share download links to these data, that way we can reproduce locally and look more closely at the issue? Thanks! :qiime2: :t_rex:

Hi Matthew,
Here are the beta-dist.qza (43.6 KB)
(Bray-Curtis distance matrix) and metadata.txt (462 Bytes)
files, which we linked to the Adonis code described in my initial post. Thanks for your time! :qiime2: :face_with_monocle:

Thank you for sharing your data, @bsen2018.

This is a bug that we previously caught and have already fixed. The fix will be available in next month’s release of QIIME 2. For now, the easiest thing to do is just change the header ID from #SampleID to sample-id.

Good luck!

2 Likes