dada2 denoise-paired error (return code 1)

I’m working with QIIME2 2020.8 and running into the return code 1 error with the denoise-paired command.

Here is the command I’m running:

qiime dada2 denoise-paired --i-demultiplexed-seqs sequences_16S.qza --p-trim-left-f 19 --p-trim-left-r 20 --p-trunc-len-f 250 --p-trunc-len-r 200 --o-table working-16S/table.qza --o-representative-sequences working-16S/rep-seqs.qza --o-denoising-stats working-16S/stats.qza

Here is the error I get:

Plugin error from dada2:
An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.
Debug info has been saved to /usr/local/scratch/METAGENOMICS/dkaul/tmp/qiime2-q2cli-err-3igc8xuo.log

Attaching the stderr log as follows:

R version 3.3.1 (2016-06-21)
Loading required package: Rcpp
Error in dyn.load(file, DLLpath = DLLpath, …) :
unable to load shared object ‘/local/ifs2_devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/R/library/Rcpp/libs/’:
/local/ifs2_devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/R/library/Rcpp/libs/ undefined symbol: R_ContinueUnwind
Error: package ‘Rcpp’ could not be loaded
Execution halted
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 /usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/forward /usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/reverse /usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/output.tsv.biom /usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/track.tsv /usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/filt_f /usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/filt_r 250 200 19 20 2.0 2.0 2 independent consensus 1.0 8 1000000

Traceback (most recent call last):
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_dada2/”, line 264, in denoise_paired
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_dada2/”, line 36, in run_commands, check=True)
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/”, line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/forward’, ‘/usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/reverse’, ‘/usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/output.tsv.biom’, ‘/usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/track.tsv’, ‘/usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/filt_f’, ‘/usr/local/scratch/METAGENOMICS/dkaul/tmp/tmpzud_dhhl/filt_r’, ‘250’, ‘200’, ‘19’, ‘20’, ‘2.0’, ‘2.0’, ‘2’, ‘independent’, ‘consensus’, ‘1.0’, ‘8’, ‘1000000’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/”, line 329, in call
results = action(**arguments)
File “”, line 2, in denoise_paired
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/”, line 245, in bound_callable
output_types, provenance)
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/usr/local/devel/ANNOTATION/dkaul/anaconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_dada2/”, line 279, in denoise_paired
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

I’ve already tried changing the $TMPDIR and unsetting all prior R_LIBS env paths.
It somehow still uses an older version of R (3.3.1) instead of version installed with QIIME2 (3.5.1). What am I missing here?

System versions
Python version: 3.6.10
QIIME 2 release: 2020.8
QIIME 2 version: 2020.8.0
q2cli version: 2020.8.0

Installed plugins
alignment: 2020.8.0
composition: 2020.8.0
cutadapt: 2020.8.0
dada2: 2020.8.0
deblur: 2020.8.0
demux: 2020.8.0
diversity: 2020.8.0
diversity-lib: 2020.8.0
emperor: 2020.8.0
feature-classifier: 2020.8.0
feature-table: 2020.8.0
fragment-insertion: 2020.8.0
gneiss: 2020.8.0
longitudinal: 2020.8.0
metadata: 2020.8.0
phylogeny: 2020.8.0
quality-control: 2020.8.0
quality-filter: 2020.8.0
sample-classifier: 2020.8.0
taxa: 2020.8.0
types: 2020.8.0
vsearch: 2020.8.0

Hi Drishti!

Thanks for reaching out, happy to work with you on this dada2 error.

This error looks to be related to what you mentioned above:

I suspect that your R libs are located in a different env path than the one you are running QIIME from. I’d try installing/updating R (version 3.5.1) under the environment that you are running QIIME from and see if that helps!

1 Like

Thanks so much! Yes, as it turns out, the QIIME env was not getting activated correctly, so it was calling two different R versions.
This has been resolved now.

1 Like

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