# DADA2 Error Return code 1

**URL:** https://forum.qiime2.org/t/dada2-error-return-code-1/7140
**Category:** User Support
**Tags:** dada2
**Created:** [November 23, 2018, 2:20am UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140 "2018-11-23T02:20:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![black.beaker](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@black.beaker](https://forum.qiime2.org/u/black.beaker)
#### Post date: [November 23, 2018, 2:20am UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140/1 "2018-11-23T02:20:17Z")

</div>

Hi All,

Have been attempting to run Dada2 (qiime2 v2018.4) using this script:

qiime dada2 denoise-paired --i-demultiplexed-seqs /scratch/pv54/Beks/Tanti-ST/tanti-st-imported-sequences.qza --p-trunc-len-f 0 --p-trunc-len-r 0 --p-trim-left-f 17 --p-trim-left-r 17 --p-n-threads 0 --p-no-hashed-feature-ids --p-max-ee 2 --verbose --output-dir /scratch/pv54/Beks/Tanti-ST/dada2/

I have run my datasets with this before with no issue, it just seems to be this recent combination that is setting it off (though a qiime2 update to 2018.11 has occurred in the last 2 days on the server, so I am hoping it isn't related to that; I have run this command on this version and received the same error so I am assuming not)

The error reads.

R version 3.4.1 (2017-06-30)  
Loading required package: Rcpp  
DADA2 R package version: 1.6.0

1. Filtering Error in names(answer) \<- names1 :  
'names' attribute [359] must be the same length as the vector [123]  
Execution halted  
Traceback (most recent call last):  
File "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/site-packages/q2\_dada2/\_denoise.py", line 229, in denoise\_paired  
run\_commands([cmd])  
File "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/site-packages/q2\_dada2/\_denoise.py", line 36, in run\_commands  
subprocess.run(cmd, check=True)  
File "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/subprocess.py", line 398, in run  
output=stdout, stderr=stderr)  
subprocess.CalledProcessError: Command '['run\_dada\_paired.R', '/home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/forward', '/home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/reverse', '/home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/output.tsv.biom', '/home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/track.tsv', '/home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/filt\_f', '/home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/filt\_r', '0', '0', '17', '17', '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 "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/site-packages/q2cli/commands.py", line 274, in **call**  
results = action(\*\*arguments)  
File "", line 2, in denoise\_paired  
File "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/site-packages/qiime2/sdk/action.py", line 231, in bound\_callable  
output\_types, provenance)  
File "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/site-packages/qiime2/sdk/action.py", line 366, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/usr/local/anaconda/4.3.1-Python3.5-gcc5/envs/qiime2-2018.4/lib/python3.5/site-packages/q2\_dada2/\_denoise.py", line 244, 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.

See above for debug info.  
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 /home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/forward /home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/reverse /home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/output.tsv.biom /home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/track.tsv /home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/filt\_f /home/rebekah/pv54\_scratch/QIIME\_TEMP/tmpye93nahy/filt\_r 0 0 17 17 2.0 2 consensus 1.0 0 1000000

Any help is much appreciated!

Cheers

---

<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: [November 26, 2018, 6:19pm UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140/2 "2018-11-26T18:19:11Z")

</div>



---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [November 26, 2018, 10:19pm UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140/3 "2018-11-26T22:19:56Z")

</div>

Hi @black.beaker,

It looks like this is a result of running out of memory between your different threads, causing the odd failure you see:  
[https://github.com/benjjneb/dada2/issues/273](https://github.com/benjjneb/dada2/issues/273)

Since you set:

```bash
--p-n-threads 0

```

QIIME 2 will attempt to infer how many threads are available and use that, but it's possible we've got something wrong there.

How much memory and how many physical CPU cores do you have (also how many logical)? If you know the CPU model I can look that up as well.

* * *

In any case the solution is to reduce that number of threads you use, maybe try half the number of cores you have?

P.S. I would also recommend using the upgraded QIIME 2 which includes a more recent DADA2. You would still have gotten the same error likely, but at least it would have made more sense 🙂

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [November 26, 2018, 10:19pm UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140/4 "2018-11-26T22:19:58Z")

</div>



---

<div class="post-metadata">

### Author: ![black.beaker](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@black.beaker](https://forum.qiime2.org/u/black.beaker)
#### Post date: [December 11, 2018, 9:30am UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140/7 "2018-12-11T09:30:35Z")

</div>

Yep, took us a bit, but there seems to be something odd with our cluster. So have dropped the number of threads and it seems to be doing the trick for the moment.

We are now using v2018.11.

Cheers

---

<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: [January 11, 2019, 3:30pm UTC](https://forum.qiime2.org/t/dada2-error-return-code-1/7140/8 "2019-01-11T15:30:39Z")

</div>

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