# Error while running DADA2 (return code 1) in linux

**URL:** https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347
**Category:** User Support
**Tags:** dada2
**Created:** [May 29, 2018, 2:16pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347 "2018-05-29T14:16:03Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ju4n\_dc](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ju4n_dc/32/4299_2.png) [@ju4n\_dc](https://forum.qiime2.org/u/ju4n_dc)
#### Post date: [May 29, 2018, 2:16pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/1 "2018-05-29T14:16:03Z")

</div>

Hi,  
I'm getting the following error when I try to run the DADA2 denoising step (qiime 2018.4) with a small 16S dataset (2x150) on ubuntu 16.04.

"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 /tmp/qiime2-q2cli-err-89jqjumm.log"

Commands:

qiime tools import   
--type 'SampleData[PairedEndSequencesWithQuality]'   
--input-path u01-manifest   
--output-path u01-demux.qza   
--source-format PairedEndFastqManifestPhred33

qiime dada2 denoise-paired   
--i-demultiplexed-seqs u01-demux.qza   
--p-trunc-len-f 150   
--p-trunc-len-r 149   
--p-trim-left-f 0   
--p-trim-left-r 0   
--output-dir u01-denoise-dada2

Debug log:

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/tmpz8rk9v01/forward /tmp/tmpz8rk9v01/reverse /tmp/tmpz8rk9v01/output.tsv.biom /tmp/tmpz8rk9v01/track.tsv /tmp/tmpz8rk9v01/filt\_f /tmp/tmpz8rk9v01/filt\_r 150 149 0 0 2.0 2 consensus 1.0 1 1000000

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

1. Filtering ....
2. Learning Error Rates  
2a) Forward Reads  
Initializing error rates to maximum possible estimate.  
Sample 1 - 14397 reads in 5342 unique sequences.  
Sample 2 - 14438 reads in 4676 unique sequences.  
Sample 3 - 14476 reads in 5887 unique sequences.  
Sample 4 - 14647 reads in 6065 unique sequences.  
selfConsist step 2  
selfConsist step 3  
selfConsist step 4  
selfConsist step 5  
selfConsist step 6  
selfConsist step 7  
selfConsist step 8  
selfConsist step 9  
selfConsist step 10  
Self-consistency loop terminated before convergence.  
2b) Reverse Reads  
Initializing error rates to maximum possible estimate.  
Error rates could not be estimated.  
Error in err[c(1, 6, 11, 16),] \<- 1 :  
incorrect number of subscripts on matrix  
Calls: dada  
Execution halted  
Traceback (most recent call last):  
File "/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2\_dada2/\_denoise.py", line 229, in denoise\_paired  
run\_commands([cmd])  
File "/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2\_dada2/\_denoise.py", line 36, in run\_commands  
subprocess.run(cmd, check=True)  
File "/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/subprocess.py", line 398, in run  
output=stdout, stderr=stderr)  
subprocess.CalledProcessError: Command '['run\_dada\_paired.R', '/tmp/tmpz8rk9v01/forward', '/tmp/tmpz8rk9v01/reverse', '/tmp/tmpz8rk9v01/output.tsv.biom', '/tmp/tmpz8rk9v01/track.tsv', '/tmp/tmpz8rk9v01/filt\_f', '/tmp/tmpz8rk9v01/filt\_r', '150', '149', '0', '0', '2.0', '2', 'consensus', '1.0', '1', '1000000']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File "/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2cli/commands.py", line 274, in **call**  
results = action(\*\*arguments)  
File "", line 2, in denoise\_paired  
File "/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/qiime2/sdk/action.py", line 231, in bound\_callable  
output\_types, provenance)  
File "/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/qiime2/sdk/action.py", line 366, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/home/usuario/anaconda2/envs/qiime2.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.

I've followed the same steps before using other datasets without problems  
any help is welcome

thanks in advance

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [May 29, 2018, 2:43pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/2 "2018-05-29T14:43:22Z")

</div>



---

<div class="post-metadata">

### Author: ![ju4n\_dc](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ju4n_dc/32/4299_2.png) [@ju4n\_dc](https://forum.qiime2.org/u/ju4n_dc)
#### Post date: [May 29, 2018, 3:14pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/3 "2018-05-29T15:14:51Z")

</div>

results from count\_seqs.py in qiime1.9:

20195 : ssr\_59439\_\_R2\_\_L001.fastq (Sequence lengths (mean +/- std): 149.6067 +/- 5.1120)  
20195 : ssr\_59439\_\_R1\_\_L001.fastq (Sequence lengths (mean +/- std): 150.4391 +/- 5.2154)  
20263 : ssr\_59439\_\_R2\_\_L002.fastq (Sequence lengths (mean +/- std): 149.5798 +/- 5.3765)  
20263 : ssr\_59439\_\_R1\_\_L002.fastq (Sequence lengths (mean +/- std): 150.4361 +/- 5.2839)  
20358 : ssr\_59439\_\_R2\_\_L003.fastq (Sequence lengths (mean +/- std): 149.5929 +/- 5.2139)  
20358 : ssr\_59439\_\_R1\_\_L003.fastq (Sequence lengths (mean +/- std): 150.4473 +/- 5.1335)  
20825 : ssr\_59439\_\_R2\_\_L004.fastq (Sequence lengths (mean +/- std): 149.6036 +/- 5.1277)  
20825 : ssr\_59439\_\_R1\_\_L004.fastq (Sequence lengths (mean +/- std): 150.4470 +/- 5.0013)

manifest  
sample-id,absolute-filepath,direction  
1,ssr\_59439\_\_R1\_\_L001.fastq.gz,forward  
2,ssr\_59439\_\_R1\_\_L002.fastq.gz,forward  
3,ssr\_59439\_\_R1\_\_L003.fastq.gz,forward  
4,ssr\_59439\_\_R1\_\_L004.fastq.gz,forward  
1,ssr\_59439\_\_R2\_\_L001.fastq.gz,reverse  
2,ssr\_59439\_\_R2\_\_L002.fastq.gz,reverse  
3,ssr\_59439\_\_R2\_\_L003.fastq.gz,reverse  
4,ssr\_59439\_\_R2\_\_L004.fastq.gz,reverse

---

<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: [May 31, 2018, 3:44am UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/4 "2018-05-31T03:44:56Z")

</div>

Hi there @ju4n_dc! This looks pretty similar [to this post](https://forum.qiime2.org/t/dada2-error-return-code-1-1/4339/4). Please take a look at that and let us know if the virtual machine situation applies to you. Thanks! 🦖 :qiime2:

---

<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: [May 31, 2018, 3:45am UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/5 "2018-05-31T03:45:01Z")

</div>



---

<div class="post-metadata">

### Author: ![ju4n\_dc](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ju4n_dc/32/4299_2.png) [@ju4n\_dc](https://forum.qiime2.org/u/ju4n_dc)
#### Post date: [May 31, 2018, 12:14pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/6 "2018-05-31T12:14:51Z")

</div>

"This usually indicates that DADA2 ran out of memory while processing. It looks like you might be using the VirtualBox image (based on the filepaths in your traceback; can you please confirm though). You should might be able to increase to allocated memory to the virtual machine."

Thanks for your response. I'm running qiime2 (2018.4) within a conda enviroment on ubuntu 16.04, just as described [here](https://docs.qiime2.org/2018.4/install/native/#install-qiime-2-within-a-conda-environment).

I am not very familiar with how to increase the allocated memory to each conda env.  
Is there a post where this is explained?

Thanks again!

---

<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: [May 31, 2018, 1:03pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/7 "2018-05-31T13:03:45Z")

</div>



---

<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: [June 2, 2018, 5:22pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/8 "2018-06-02T17:22:41Z")

</div>

> [@ju4n\_dc](#):
>
> I am not very familiar with how to increase the allocated memory to each conda env.

Your conda environment should already have access to all of your system's memory. Since this is the case, the only other option I can think of is to run this on a machine with more RAM resources. Sorry, wish I had a better answer for you. :qiime2:

---

<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: [June 2, 2018, 5:22pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/9 "2018-06-02T17:22:42Z")

</div>



---

<div class="post-metadata">

### Author: ![ju4n\_dc](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ju4n_dc/32/4299_2.png) [@ju4n\_dc](https://forum.qiime2.org/u/ju4n_dc)
#### Post date: [June 4, 2018, 12:18pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/10 "2018-06-04T12:18:39Z")

</div>

It's weird because I already ran a lot of other larger datasets using dada2 on this computer without a problem (its a i7 with 16 Gb RAM). I guess the problem is something in this particular dataset. The idea was to compare the levels of classification achieved (L6 or L7) with 150 vs. 250 bp reads. I'm gonna try to run it with the R1 reads only.

---

<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: [July 5, 2018, 6:18pm UTC](https://forum.qiime2.org/t/error-while-running-dada2-return-code-1-in-linux/4347/11 "2018-07-05T18:18:40Z")

</div>

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