adonis error: returned non-zero exit status 1.

Hi everyone,

I am trying to run adonis test but I couldn’t due to this error:
Plugin error from diversity:
Command ‘[‘run_adonis.R’, ‘/tmp/tmpmghr7vtq/dm.tsv’, ‘/tmp/tmpmghr7vtq/md.tsv’, ‘SiteName’, ‘999’, ‘1’, ‘/tmp/qiime2-temp-nmiymj2h/adonis.tsv’]’ returned non-zero exit status 1.

Could you help me please?


Hi @delibasanta,
Welcome to the forum!

For troubleshooting purposes like this, as it is mentioned in the before-you-post notification box, it is always a good idea to report at minimum:

  1. Qiime2 version you are using
  2. The exact (copy & paste) commands you are running
  3. And the full error message you get. This means sometimes having to re-run the command with the --verbose tag in order to get the full error message and share with us.

Please provide us with these, otherwise there is not much we can work with. Thanks

Hi @Mehrbod_Estaki!

Thank you for your support. I am using qiime2-2019.7. The command that I am running is:
qiime diversity adonis --i-distance-matrix Core_Metric_Results_Bsal_Newts_5000/jaccard_distance_matrix.qza --m-metadata-file Metadata_Hyliolas4.txt --p-formula SiteName+Vegetation --o-visualization Adonis_Results_SiteName_Vegetation.qzv --verbose

The full error message is:

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/tmp5yqfz4w1/dm.tsv /tmp/tmp5yqfz4w1/md.tsv SiteName+Vegetation 999 1 /tmp/qiime2-temp-s0f4pta4/adonis.tsv

R version 3.5.1 (2018-07-02)
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-5
Error in read.table(file = args[[2]], sep = “\t”, header = TRUE, fill = TRUE, :
more columns than column names
Ejecución interrumpida
Traceback (most recent call last):
File “/home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/”, line 327, in call
results = action(**arguments)
File “</home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/>”, line 2, in adonis
File “/home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/”, line 240, in bound_callable
output_types, provenance)
File “/home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/”, line 445, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File “/home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_beta/”, line 367, in adonis
File “/home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_beta/”, line 393, in _run_command, check=True)
File “/home/delibasanta/miniconda/envs/qiime2-2019.7/lib/python3.6/”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_adonis.R’, ‘/tmp/tmp5yqfz4w1/dm.tsv’, ‘/tmp/tmp5yqfz4w1/md.tsv’, ‘SiteName+Vegetation’, ‘999’, ‘1’, ‘/tmp/qiime2-temp-s0f4pta4/adonis.tsv’]’ returned non-zero exit status 1.

Plugin error from diversity:

Command ‘[‘run_adonis.R’, ‘/tmp/tmp5yqfz4w1/dm.tsv’, ‘/tmp/tmp5yqfz4w1/md.tsv’, ‘SiteName+Vegetation’, ‘999’, ‘1’, ‘/tmp/qiime2-temp-s0f4pta4/adonis.tsv’]’ returned non-zero exit status 1.

See above for debug info.

Thank you very much,


Hi @delibasanta,
Thanks for the additional info. This is a new error for me, but I think the important bit is here:

I believe your metadata file may be causing some issues. Have you validated your metadata file using keemei by chance? You can follow the instructions here for an example. Do that and let us know and we can work from there.

1 Like

Hi @Mehrbod_Estaki!

Thank you very much for your support. As you said, I had a problem with my metadata. I modified it to have only the columns that I needed, and it worked!

Thank you again,

1 Like