Plugin error from diversity when using adonis plugin

Hi,
I am trying to run PERMANOVA using the adonis plugin.

Here is my code:

qiime diversity adonis \
    --i-distance-matrix output/output/pmoA_deicode_distance_nobulk.qza \
    --m-metadata-file metadata/metadata.txt \
    --p-formula "genotype" \
    --o-visualization output/output/pmoA_permanova_nobulk.qzv

However, I always got this error code:

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 /var/folders/cj/8xt2ysm50wz8ww85tr7c1hfh0000gn/T/tmp5n_zhc4w/dm.tsv /var/folders/cj/8xt2ysm50wz8ww85tr7c1hfh0000gn/T/tmp5n_zhc4w/md.tsv genotype 999 1 /var/folders/cj/8xt2ysm50wz8ww85tr7c1hfh0000gn/T/qiime2-temp-q95efxwd/adonis.tsv

R version 4.1.3 (2022-03-10) 
Loading required package: permute
Loading required package: lattice
Error: package or namespace load failed for ‘lattice’ in library.dynam(lib, package, package.lib):
 shared object ‘lattice.so’ not found
Error: package ‘lattice’ could not be loaded
Execution halted
Traceback (most recent call last):
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-373>", line 2, in adonis
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 453, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_beta/_visualizer.py", line 382, in adonis
    _run_command(cmd)
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_beta/_visualizer.py", line 408, in _run_command
    subprocess.run(cmd, check=True)
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_adonis.R', '/var/folders/cj/8xt2ysm50wz8ww85tr7c1hfh0000gn/T/tmp5n_zhc4w/dm.tsv', '/var/folders/cj/8xt2ysm50wz8ww85tr7c1hfh0000gn/T/tmp5n_zhc4w/md.tsv', 'genotype', '999', '1', '/var/folders/cj/8xt2ysm50wz8ww85tr7c1hfh0000gn/T/qiime2-temp-q95efxwd/adonis.tsv']' returned non-zero exit status 1.

Also, I followed the solution suggested in this post, but unfortunately, I was unable to install Qiime yet in my Mac mini.

Now, I am using this hard- and software:
MacBook Pro 13 inch (2017) running macOS Monterey.

Any help and support would be highly appreciated and thank you so much.

Best,
Sandy

Hello @pkmnsandy, please let us know if reinstalling QIIME 2 solved the problem once you are able to get it reinstalled. Thank you.

Hi, after the reinstall I try to run qiime diversity adonis. Unfortunately, I still get this 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 /var/folders/zx/rys0b_8576z_gn4rt8klcrzh0000gn/T/tmp_x6fj8dj/dm.tsv /var/folders/zx/rys0b_8576z_gn4rt8klcrzh0000gn/T/tmp_x6fj8dj/md.tsv genotype*nitrogen*soil*compartment 999 1 /var/folders/zx/rys0b_8576z_gn4rt8klcrzh0000gn/T/qiime2-temp-mtazkwxj/adonis.tsv

R version 4.2.1 (2022-06-23) 
Loading required package: permute
Loading required package: lattice
Error: package or namespace load failed for ‘lattice’ in library.dynam(lib, package, package.lib):
 shared object ‘lattice.so’ not found
Error: package ‘lattice’ could not be loaded
Execution halted
Traceback (most recent call last):
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-114>", line 2, in adonis
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 453, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_beta/_visualizer.py", line 382, in adonis
    _run_command(cmd)
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_beta/_visualizer.py", line 408, in _run_command
    subprocess.run(cmd, check=True)
  File "/Users/pkmnsandy/opt/miniconda3/envs/qiime2-2022.2/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_adonis.R', '/var/folders/zx/rys0b_8576z_gn4rt8klcrzh0000gn/T/tmp_x6fj8dj/dm.tsv', '/var/folders/zx/rys0b_8576z_gn4rt8klcrzh0000gn/T/tmp_x6fj8dj/md.tsv', 'genotype*nitrogen*soil*compartment', '999', '1', '/var/folders/zx/rys0b_8576z_gn4rt8klcrzh0000gn/T/qiime2-temp-mtazkwxj/adonis.tsv']' returned non-zero exit status 1.

Hi @pkmnsandy, Do you have R installed elsewhere on your system? I ask because it says you're using R version 4.2.1, but QIIME 2 2022.2 uses R 4.1.3. It would appear as though some wires are crossed and QIIME 2 is trying to use the wrong version of R. Could you please type which R into the command line with your QIIME 2 environment active and also echo $PATH and provide the output of those two commands here?

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