Error in dada2 denoising-paired (return to code 1)

Hi,

I have installed the latest version of qiime yesterday and I got the following error message after trying to use DADA2. Eventhough, other users found similar error code 1 but that I got different error with dada2(R_continueUnwind). I hope to find a solution in this regard, Many thanks in advance

qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trim-left-f 0 --p-trunc-len-f 20 --p-trim-left-r 0 --p-trunc-len-r 20 --o-representative-sequences rep-seqs-pe64-dada2.qza --o-table table-pe64-dada2.qza --o-denoising-stats stats-pe64-dada2.qza --p-n-threads 0 --verbose
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 /tmp/tmpwqavybrq/forward /tmp/tmpwqavybrq/reverse /tmp/tmpwqavybrq/output.tsv.biom /tmp/tmpwqavybrq/track.tsv /tmp/tmpwqavybrq/filt_f /tmp/tmpwqavybrq/filt_r 20 20 0 0 2.0 2 consensus 1.0 0 1000000

R version 3.4.1 (2017-06-30)
Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in dyn.load(file, DLLpath = DLLpath, …):
unable to load shared object ‘/home/smurugesan/bin/R/scales/libs/scales.so’:
/home/smurugesan/bin/R/scales/libs/scales.so: undefined symbol: R_ContinueUnwind
Execution halted
Traceback (most recent call last):
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 231, in denoise_paired
run_commands([cmd])
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpwqavybrq/forward’, ‘/tmp/tmpwqavybrq/reverse’, ‘/tmp/tmpwqavybrq/output.tsv.biom’, ‘/tmp/tmpwqavybrq/track.tsv’, ‘/tmp/tmpwqavybrq/filt_f’, ‘/tmp/tmpwqavybrq/filt_r’, ‘20’, ‘20’, ‘0’, ‘0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘0’, ‘1000000’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “</home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-442>”, line 2, in denoise_paired
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 365, in callable_executor
output_views = self._callable(**view_args)
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 246, 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.

Plugin error from dada2:

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

Hi @Selva_Sankar! You appear to have a conflicting deployment of R in your PATH. Do you have an .Rprofile file in your homedir? If so, what does it say?

cat ~/.Rprofile

Thanks! :qiime2: :t_rex:

Hi Matthew,

Thanks for your reply. Please find below for the Rprofile content. Please let me know your suggestions, Thank you.

$ cat ~/.Rprofile
.libPaths( c( .libPaths(), “~/bin/R”))

Hello Selva,

Removing or renaming the .Rprofile file should allow the correct version of R installed in your conda environment to work.

You could try this

mv ~/.Rprofile ~/.Rprofile_backup

then try activating the conda environment and running dada2 again.

Colin

Dear Collin,
Thanks for your help. I tried your suggestion by renaming .Rprofile to .Rprofile_backup. But the error still persists.
I look forward to overcome this issue. Thank you
qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trim-left-f 0 --p-trunc-len-f 20 --p-trim-left-r 0 --p-trunc-len-r 20 --o-representative-sequences rep-seqs-pe64-dada2.qza --o-table table-pe64-dada2.qza --o-denoising-stats stats-pe64-dada2.qza --p-n-threads $(nproc) --verbose
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 /tmp/tmproc12lvm/forward /tmp/tmproc12lvm/reverse /tmp/tmproc12lvm/output.tsv.biom /tmp/tmproc12lvm/track.tsv /tmp/tmproc12lvm/filt_f /tmp/tmproc12lvm/filt_r 20 20 0 0 2.0 2 consensus 1.0 4 1000000

R version 3.4.1 (2017-06-30)
Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in dyn.load(file, DLLpath = DLLpath, …):
unable to load shared object ‘/home/smurugesan/bin/R/scales/libs/scales.so’:
/home/smurugesan/bin/R/scales/libs/scales.so: undefined symbol: R_ContinueUnwind
Execution halted
Traceback (most recent call last):
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 231, in denoise_paired
run_commands([cmd])
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmproc12lvm/forward’, ‘/tmp/tmproc12lvm/reverse’, ‘/tmp/tmproc12lvm/output.tsv.biom’, ‘/tmp/tmproc12lvm/track.tsv’, ‘/tmp/tmproc12lvm/filt_f’, ‘/tmp/tmproc12lvm/filt_r’, ‘20’, ‘20’, ‘0’, ‘0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘4’, ‘1000000’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “</home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-442>”, line 2, in denoise_paired
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 365, in callable_executor
output_views = self._callable(**view_args)
File “/home/smurugesan/bin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 246, 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.

Your RPATH is still picking up the old R installations — can you double-check that you don’t still have a file called ~/.Rprofile? Also, want to run the env command and share those results with us? Thanks!

Dear Matthew,
I checked that /.Rprofile is not exist anymore. But a colleague suggested to use the following command which fixed the error. Now i can able to run the dada2 without any issues. Thank you.

unset R_LIBS

3 Likes

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