# DADA2 in R returned with error code 1

**URL:** <https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831>\
**Category:** Technical Support\
**Created:** [July 24, 2020, 6:36am UTC](https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831 "2020-07-24T06:36:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![qamrq25](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qamrq25](https://forum.qiime2.org/u/qamrq25)\
**Post date:** [July 24, 2020, 6:36am UTC](https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831/1 "2020-07-24T06:36:14Z")

</div>

Hi everyone. Nice to be back with a new problem 😅 . I have seen around forum with this error code but couldn't find the one similar to mine.

I am currently running Qiime2-2020.2 and analyzing 1012 x single end fastq files.I have used the "manifest file import SingleEndFastqManifestPhred33V2" protocol to import my fastq run files in .qza artifacts for analysis. I have successfully ran the dada2 denoise-single command on single-end-demux.qza yesterday. And was also able to produce table.qza and rep-seq.qza successfully.  
But I made a mistake with **Filenames** so I planed to re-analyse the data with correct filenames.I have successfully produced single-end demux.qza file but ran into problem during data2 denoise part.I ran into the following error:

> **Plugin error from dada2:**
> 
> \*\* An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.\*\*

Log file:

> **cat /tmp/qiime2-q2cli-err-nv2jv9mz.log**  
> \*\*R version 3.5.1 (2018-07-02) \*\*  
> **Loading required package: Rcpp**  
> \*\*DADA2: 1.10.0 / Rcpp: 1.0.3 / RcppParallel: 4.4.4 \*\*  
> **1) Filtering ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................**  
> **2) Learning Error Rates**  
> **192186935 total bases in 1023509 reads from 26 samples will be used for learning the error rates.**  
> **3) Denoise samples .................................................................................Error in dada\_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), : \*\*  
> \*\* Bad lambda.**  
> **Calls: dada -\> dada\_uniques**  
> **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\_single.R /tmp/qiime2-archive-2kfi64qt/a5818789-cbbc-4415-bc34-98495d69e528/data /tmp/tmp5\_l50h9j/output.tsv.biom /tmp/tmp5\_l50h9j/track.tsv /tmp/tmp5\_l50h9j 0 0 2.0 2 Inf consensus 1.0 1 1000000 NULL 16**
> 
> **Traceback (most recent call last):**  
> \*\* File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 177, in \_denoise\_single\*\*  
> \*\* run\_commands([cmd])\*\*  
> \*\* File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 36, in run\_commands\*\*  
> \*\* subprocess.run(cmd, check=True)\*\*  
> \*\* File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py", line 418, in run\*\*  
> \*\* output=stdout, stderr=stderr)\*\*  
> **subprocess.CalledProcessError: Command '['run\_dada\_single.R', '/tmp/qiime2-archive-2kfi64qt/a5818789-cbbc-4415-bc34-98495d69e528/data', '/tmp/tmp5\_l50h9j/output.tsv.biom', '/tmp/tmp5\_l50h9j/track.tsv', '/tmp/tmp5\_l50h9j', '0', '0', '2.0', '2', 'Inf', 'consensus', '1.0', '1', '1000000', 'NULL', '16']' returned non-zero exit status 1.**

My conditions are --p-trim-left 0 \ --p-trunc-len 0 \ for dada2 and using them with "nohup". I am feeling there is something wrong going on with tmp folder by looking at the log file. I will be glad to receive input from you guys. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![qamrq25](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qamrq25](https://forum.qiime2.org/u/qamrq25)\
**Post date:** [July 24, 2020, 6:23pm UTC](https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831/2 "2020-07-24T18:23:58Z")

</div>

Update: I have tried running the analysis without "nohup" and got this error:

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

Log file:

> 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\_single.R /tmp/qiime2-archive-4y3s7tt1/2df20be1-3601-4636-9ca5-af97146fb3ad/data /tmp/tmpndh9e8xk/output.tsv.biom /tmp/tmpndh9e8xk/track.tsv /tmp/tmpndh9e8xk 0 0 2.0 2 Inf consensus 1.0 1 1000000 NULL 16
> 
> R version 3.5.1 (2018-07-02)  
> Loading required package: Rcpp  
> DADA2: 1.10.0 / Rcpp: 1.0.3 / RcppParallel: 4.4.4
> 
> 1. Filtering ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
> 2. Learning Error Rates  
> 252141014 total bases in 1000809 reads from 42 samples will be used for learning the error rates.
> 3. Denoise samples .................................................................................Traceback (most recent call last):  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 177, in \_denoise\_single  
> run\_commands([cmd])  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 36, in run\_commands  
> subprocess.run(cmd, check=True)  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py", line 418, in run  
> output=stdout, stderr=stderr)  
> subprocess.CalledProcessError: Command '['run\_dada\_single.R', '/tmp/qiime2-archive-4y3s7tt1/2df20be1-3601-4636-9ca5-af97146fb3ad/data', '/tmp/tmpndh9e8xk/output.tsv.biom', '/tmp/tmpndh9e8xk/track.tsv', '/tmp/tmpndh9e8xk', '0', '0', '2.0', '2', 'Inf', 'consensus', '1.0', '1', '1000000', 'NULL', '16']' died with \<Signals.SIGABRT: 6\>.
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 328, in **call**  
> results = action(\*\*arguments)  
> File "\</home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-453\>", line 2, in denoise\_single  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound\_callable  
> output\_types, provenance)  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in _callable\_executor_  
> output\_views = self.\_callable(\*\*view\_args)  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 212, in denoise\_single  
> band\_size='16')  
> File "/home/qamar/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 188, in \_denoise\_single  
> " and stderr to learn more." % e.returncode)  
> Exception: An error was encountered while running DADA2 in R (return code -6), please inspect stdout and stderr to learn more.

I got this error after 4 hours. Also I am planning to reinstall QIIME2 env and see if I get the errors again.

Also I noticed the log says R version 02-07-2018 whereas I have R version installed 3.6.3 (2020-02-29) when I launch R from terminal.

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [July 27, 2020, 9:06pm UTC](https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831/3 "2020-07-27T21:06:29Z")

</div>

Hi @qamrq25!

I'm sorry to hear things aren't working. This part of the error message jumped out at me:

> [@qamrq25](#):
>
> Signals.SIGABRT: 6

[https://en.wikipedia.org/wiki/Signal\_(IPC)#SIGABRT](https://en.wikipedia.org/wiki/Signal_(IPC)#SIGABRT)

Something told DADA2 to abort - maybe your clustering system? Maybe the host OS? Do you have a sysadmin you can check in with on this?

> [@qamrq25](#):
>
> Also I noticed the log says R version 02-07-2018 whereas I have R version installed 3.6.3 (2020-02-29) when I launch R from terminal.

No worries there - QIIME 2 conda environment ships its own version of R.

---

<div class="post-metadata">

**Author:** ![qamrq25](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qamrq25](https://forum.qiime2.org/u/qamrq25)\
**Post date:** [July 28, 2020, 7:51am UTC](https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831/4 "2020-07-28T07:51:36Z")

</div>

Hey @thermokarst. Thanks for the help. It will sound strange but I got it worked by a simple trick. I changed my Sequences name back to normal, I used before for successful analysis. 😅  
So basically I was analyzing 1012 samples and named each sample Protozoa0001, Protozoa0002....... But got the error posted above. To get it working back I changed the names to Protozoa1, Protozoa2....And I was successful with the denoise step.

Although I have asked the admin regarding "Signals.SIGABRT: 6". And will see if it caused the problem with names.  
Regards!

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [August 28, 2020, 1:51pm UTC](https://forum.qiime2.org/t/dada2-in-r-returned-with-error-code-1/15831/5 "2020-08-28T13:51:38Z")

</div>

Closed on August 28, 2020, 1:51pm UTC

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