Plugin error from dada2: An error was encountered while running DADA2 in R (return code 1), please insp ect stdout and stderr to learn more. See above for debug info.

Hello I encountered the following while running DADA2 in Qiime2 using this command: qiime dada2 denoise-paired --p-n-threads 8 --i-demultiplexe d-seqs p02_primer_trimmed.qza --p-trunc-len-f 258 --p-trunc-len-r 211 --output-d ir DADA2_denoising_output --verbose > out.log

This error encountered: Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in dyn.load(file, DLLpath = DLLpath, …):
unable to load shared object ‘/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/en vs/qiime2-2020.2/lib/R/library/data.table/libs/datatable.so’:
/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/R/librar y/data.table/libs/datatable.so: failed to map segment from shared object: Cannot allocate memory
Execution halted
Traceback (most recent call last):
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2_dada2/_denoise.py”, line 257, in denoise_paired
run_commands([cmd])
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpesrr8g2n/ forward’, ‘/tmp/tmpesrr8g2n/reverse’, ‘/tmp/tmpesrr8g2n/output.tsv.biom’, ‘/tmp/ tmpesrr8g2n/track.tsv’, ‘/tmp/tmpesrr8g2n/filt_f’, ‘/tmp/tmpesrr8g2n/filt_r’, ‘2 58’, ‘211’, ‘0’, ‘0’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘8’, ‘1000000’]’ re turned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/p ython3.6/site-packages/decorator.py:decorator-gen-455>”, line 2, in denoise_pair ed
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/qiime2/sdk/action.py”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2_dada2/_denoise.py”, line 272, in denoise_paired
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), pl ease inspect stdout and stderr to learn more.

Plugin error from dada2:

An error was encountered while running DADA2 in R (return code 1), please insp ect stdout and stderr to learn more.

See above for debug info.

I have already installed R and RStudio.

Thank you so much in advance.

Welcome @Clarissa!
This is the main line of the error message:

Looks like you are running out of memory!

This part of your command is probably causing the issue:

more threads will consume more memory, since you are running several processes in parallel. Try decreasing the number of threads (or even dropping that parameter altogether to run a single process), it will lead to a longer runtime but less memory use.

Good luck!

Hello Nicholas, thank you for your quick reply!
I have tried it with –p-n-threads 0,1,2,4 and leaving it out all together. None of them seem to work and the same error occurred:
Command: qiime dada2 denoise-paired --i-demultiplexed-seqs p02_prime r_trimmed.qza --p-trunc-len-f 228 --p-trunc-len-r 175 --output-dir DADA2_denoisi ng_output --verbose > out.log

Error: Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in grepl(valid_numeric_versi on_regexp, x):
invalid regular expression ‘^([[:digit:]]+[.-])*[[:digit:]]+$’, reason ‘Out of memory’
Execution halted
Traceback (most recent call last):
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2_dada2/_denoise.py”, line 257, in denoise_paired
run_commands([cmd])
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmprnd53abd/ forward’, ‘/tmp/tmprnd53abd/reverse’, ‘/tmp/tmprnd53abd/output.tsv.biom’, ‘/tmp/ tmprnd53abd/track.tsv’, ‘/tmp/tmprnd53abd/filt_f’, ‘/tmp/tmprnd53abd/filt_r’, ‘2 28’, ‘175’, ‘0’, ‘0’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘1’, ‘1000000’]’ re turned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/p ython3.6/site-packages/decorator.py:decorator-gen-455>”, line 2, in denoise_pair ed
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/qiime2/sdk/action.py”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/usr/site/hpc/x86_64/generic/Anaconda3/2020.03/envs/qiime2-2020.2/lib/py thon3.6/site-packages/q2_dada2/_denoise.py”, line 272, in denoise_paired
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), pl ease inspect stdout and stderr to learn more.

Plugin error from dada2:

An error was encountered while running DADA2 in R (return code 1), please insp ect stdout and stderr to learn more.

See above for debug info.

Again, thanks a lot.

Hi @Clarissa,

Wow, that’s a new one. Maybe my initial intuition was a red herring:

maybe the lines above are more indicative of the root issue:

A few others have reported that error on this forum, and it usually points to conflicting R deployments or installation issues. Please take a look at this topic and see if any of the troubleshooting steps in there solve this issue:

Please let me know what you find!