adonis error- returned non-zero exit status 1

Hello QIIME Team,

I have been trying to do adonis for my datasets with the command: “qiime diversity adonis --i-distance-matrix weighted_unifrac_distance_matrix.qza --m-metadata-file …/metadata_EI.tsv --p-formula Visit+Gender+Age+KL_Score --p-permutations 999 --o-visualization adonis_VisitGenderAgeKLscore.qzv”
it returns with the error(Running with --verbose)

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/tmprm7w_7bb/dm.tsv /tmp/tmprm7w_7bb/md.tsv Visit+Gender+Age+KL_Score 999 1 /tmp/qiime2-temp-z4s9dcb6/adonis.tsv
R version 3.5.1 (2018-07-02)
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-6
Error in G * t(hat) : non-conformable arrays
Calls: adonis -> sapply -> lapply -> FUN
Execution halted
Traceback (most recent call last):
File “/home/ojasvi/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</home/ojasvi/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/decorator.py:decorator-gen-436>”, line 2, in adonis
File “/home/ojasvi/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/ojasvi/miniconda3/envs/qiime2-2019.10/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/ojasvi/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py”, line 375, in adonis
_run_command(cmd)
File “/home/ojasvi/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py”, line 401, in _run_command
subprocess.run(cmd, check=True)
File “/home/ojasvi/miniconda3/envs/qiime2-2019.10/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_adonis.R’, ‘/tmp/tmprm7w_7bb/dm.tsv’, ‘/tmp/tmprm7w_7bb/md.tsv’, ‘Visit+Gender+Age+KL_Score’, ‘999’, ‘1’, ‘/tmp/qiime2-temp-z4s9dcb6/adonis.tsv’]’ returned non-zero exit status 1.

Plugin error from diversity:

Command ‘[‘run_adonis.R’, ‘/tmp/tmprm7w_7bb/dm.tsv’, ‘/tmp/tmprm7w_7bb/md.tsv’, ‘Visit+Gender+Age+KL_Score’, ‘999’, ‘1’, ‘/tmp/qiime2-temp-z4s9dcb6/adonis.tsv’]’ returned non-zero exit status 1.

I have came across the few forum discussions on adonis and count not figure out the issue by myself.

Details of data: The data has overall 135 samples - at two time points. T1 has 77 samples, T2 has 58.
Issue: When I am doing adonis at complete data set putting KL_Score as covariate - it returns with the error. However, if I remove few samples and take a paired dataset (57 T1 and 57 T2), it doesnt give any error.

Points : 1. With pain as covariate in the formula- it works fine in both the cases; 2. Using same metadata file everytime.

I hope I had put up in clear and understandable way .

Thankful for your help :slight_smile:

Best,
Ojasvi.

Hi, @SciCatalyst!

There a few reasons this error could pop up. Please check this post for a good discussion of this error: adonis error: 'non-zero exit status 1' because of 'Error in G * t(hat) : non-conformable arrays'

A colleague noticed that Adonis often throws this error if there are missing values in any of the samples, or if all values are unique.

You can run qiime tools inspect-metadata on your metadata file to check for make sure there aren’t any errors in your columns, e.g. the Age column may have a problem causing it to be treated as categorical data instead of continues data.

Let us know how you that goes!

2 Likes

Hello @andrewsanchez! Thank you for looking into this. While going through the metadata again, I figured out that there was a missing value in one of the cell - some typo-delete-save-error, Gosh!!! All sorted now!!!

Thanks Again :slight_smile:

2 Likes

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