I tried the command and I got this error:
(qiime2-2019.7) [ida.pantojafeliciano@natia0ndetlnx PERMANOVA_MAY20_2020]$ qiime diversity adonis --i-distance-matrix bray_curtis_distance_matrix.qza --m-metadata-file mapping_file_resistant_starch_only65_Jan29_2020.txt --p-formula Diet --o-visualization bray_curtis-unifracDiet-adonis_RS_DIET_May20_2020.qzv
Plugin error from diversity:
Command '['run_adonis.R', '/tmp/tmpwydn6m1v/dm.tsv', '/tmp/tmpwydn6m1v/md.tsv', 'Diet', '999', '1', '/tmp/qiime2-temp-70si7mo6/adonis.tsv']' returned non-zero exit status 1.
Debug info has been saved to /tmp/qiime2-q2cli-err-x43y9xmm.log
I have the 2019.7 QIIME2 version. The error has something to do with the version and needs to be updated?
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.
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
Execution halted
Traceback (most recent call last):
File "/var/opt/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py", line 327, in call
results = action(**arguments)
File "</var/opt/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-432>", line 2, in adonis
File "/var/opt/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
output_types, provenance)
File "/var/opt/miniconda3/envs/qiime2-2019.7/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 "/var/opt/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py", line 367, in adonis
_run_command(cmd)
File "/var/opt/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_diversity/_beta/_visualizer.py", line 393, in _run_command
subprocess.run(cmd, check=True)
File "/var/opt/miniconda3/envs/qiime2-2019.7/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_adonis.R', '/tmp/tmpwydn6m1v/dm.tsv', '/tmp/tmpwydn6m1v/md.tsv', 'Diet', '999', '1', '/tmp/qiime2-temp-70si7mo6/adonis.tsv']' returned non-zero exit status 1.
There appears to be an issue with how either your metadata or your distance matrix is being read. (I would guess your metadata). Has it worked elsewhere? Do you, by chance, have extra columns or something?
Thanks for the response. Its weird because I just used the same documents for the command qiime diversity beta-group-significance and is working. I even went to Keemei to validate the metadata and is fine.
But when I try the qiime diversity adonis command I get the error I posted. Not sure what it is...
Is there any chance you have spaces in your metadata headers or sample names? A few people have suggested this might change the way R reads your metadata.