Dada2 error - wrong version of vctrs in R

Hello,

I am running qiime2-2021.11 natively on a linux cluster with anaconda/3

I have MiSeq paired end data and the sequence quality is good. After demux I tried to run dada2 as follows:

qiime dada2 denoise-paired
--i-demultiplexed-seqs ./demux/ARMS_TOW_COI_demux.qza
--p-trim-left-f 50
--p-trunc-len-f 270
--p-trim-left-r 50
--p-trunc-len-r 250
--o-representative-sequences ./COI/ARMS_TOW_COI-seqs-dada2.qza
--o-table ./COI/ARMS_TOW_COI-table-dada2.qza
--o-denoising-stats ./COI/ARMS_TOW_COI-stats-dada2.qza

I get an error message and when I look at the log it appears as if the relevant error is the following (I will include the whole logfile at the end):

R version 4.0.5 (2021-03-31)
Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘vctrs’ 0.3.6 is being loaded, but >= 0.3.8 is required

Do I have to get the version of R or Rcpp updated? Should I just upgrade to the latest version of qiime2?
I did not get this error before (with a smaller dataset).

Any hints?

Thanks
Dave.

Full logfile follows:

Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /var/tmp/pbs.4109726.sched01/tmp99qlu54t/forward /var/tmp/pbs.4109726.sched01/tmp99qlu54t/reverse /var/tmp/pbs.4109726.sched01/tmp99qlu54t/output.tsv.biom /var/tmp/pbs.4109726.sched01/tmp99qlu54t/track.tsv /var/tmp/pbs.4109726.sched01/tmp99qlu54t/filt_f /var/tmp/pbs.4109726.sched01/tmp99qlu54t/filt_r 270 250 50 50 2.0 2.0 2 12 independent consensus 1.0 1 1000000

R version 4.0.5 (2021-03-31)
Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘vctrs’ 0.3.6 is being loaded, but >= 0.3.8 is required
Execution halted
Traceback (most recent call last):
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 266, in denoise_paired
run_commands([cmd])
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
subprocess.run(cmd, check=True)
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/var/tmp/pbs.4109726.sched01/tmp99qlu54t/forward', '/var/tmp/pbs.4109726.sched01/tmp99qlu54t/reverse', '/var/tmp/pbs.4109726.sched01/tmp99qlu54t/output.tsv.biom', '/var/tmp/pbs.4109726.sched01/tmp99qlu54t/track.tsv', '/var/tmp/pbs.4109726.sched01/tmp99qlu54t/filt_f', '/var/tmp/pbs.4109726.sched01/tmp99qlu54t/filt_r', '270', '250', '50', '50', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '1', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/apps/chpc/bio/anaconda3-2020.02/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, in denoise_paired
raise Exception("An error was encountered while running DADA2"
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

Hello David,

I concur with your diagnosis: there is a conflict between installed R packages.

> namespace ‘vctrs’ 0.3.6 is being loaded, but >= 0.3.8 is required

I have run into these issues when installing extra / new software into one of my qiime2 conda environments, which inadvertently messed up other software.

Now that is spooky! :ghost:

My guess is after the small dataset was run, something was installed that caused the large dataset to fail later. Try installing qiime2 into a fresh conda environment and see if that fixes the problem.

Hi,

I thought that I should post a follow up in case anyone had a similar issue. It turns out that qiime was using my local R library (which was out of date) rather than the global library. Once I moved/renamed the local R_Libs the issue went away.

Cheers,
Dave

2 Likes

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