# Exit Code -9 From DADA2

**URL:** https://forum.qiime2.org/t/exit-code-9-from-dada2/998
**Category:** User Support
**Tags:** dada2, memory, docker
**Created:** [August 14, 2017, 3:03pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998 "2017-08-14T15:03:44Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![KEDIR\_HAMZA](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kedir_hamza/32/8261_2.png) [@KEDIR\_HAMZA](https://forum.qiime2.org/u/KEDIR_HAMZA)
#### Post date: [August 14, 2017, 3:03pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/1 "2017-08-14T15:03:44Z")

</div>

Hi,  
Is it the same problem as mentioned above? Is there a way to fix it? Please have a look on command I have used and the error I got. Thanks in advance!

```bash
PS C:\Users\ha1254ke\KHH006_Analysis> docker run -t -i -v C:\Users\ha1254ke\KHH006_Analysis:/data qiime2/core:2017.7 qiime dada2 denoise-paired --i-demultiplexed-seqs demux-paired-end.qza --o-table table --o-representative-sequences rep-seqs --p-trim-left-f 6 --p-trim-left-r 7 --p-trunc-len-f 300 --p-trunc-len-r 192

e[31me[1mPlugin error from dada2:

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

Debug info has been saved to /tmp/qiime2-q2cli-err-_olzv864.log.e[0m

```

---

<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: [August 14, 2017, 3:06pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/2 "2017-08-14T15:06:26Z")

</div>

Pinging @benjjneb (the developer of DADA2)! Thanks!

---

<div class="post-metadata">

### Author: ![benjjneb](https://forum.qiime2.org/user_avatar/forum.qiime2.org/benjjneb/32/1602_2.png) [@benjjneb](https://forum.qiime2.org/u/benjjneb)
#### Post date: [August 14, 2017, 3:44pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/3 "2017-08-14T15:44:29Z")

</div>

@KEDIR_HAMZA

Could you please post the log file?

---

<div class="post-metadata">

### Author: ![KEDIR\_HAMZA](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kedir_hamza/32/8261_2.png) [@KEDIR\_HAMZA](https://forum.qiime2.org/u/KEDIR_HAMZA)
#### Post date: [August 15, 2017, 12:33pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/5 "2017-08-15T12:33:59Z")

</div>

Hi,  
Thank you for the reply!  
Since I am new to Docker, it will probably take me more time to figure out how to extract log files from a docker container! I will get back to you as soon as the log file is extracted.

---

<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: [August 15, 2017, 12:34pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/6 "2017-08-15T12:34:40Z")

</div>

Hi @KEDIR_HAMZA, you could add the `--verbose` flag to your `qiime` command, and then copy and paste the output:

```bash
docker run -t -i -v C:\Users\ha1254ke\KHH006_Analysis:/data qiime2/core:2017.7 \
  qiime dada2 denoise-paired \
    --i-demultiplexed-seqs demux-paired-end.qza \
    --o-table table \
    --o-representative-sequences rep-seqs \
    --p-trim-left-f 6 \
    --p-trim-left-r 7 \
    --p-trunc-len-f 300 \
    --p-trunc-len-r 192 \
    --verbose

```

---

<div class="post-metadata">

### Author: ![KEDIR\_HAMZA](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kedir_hamza/32/8261_2.png) [@KEDIR\_HAMZA](https://forum.qiime2.org/u/KEDIR_HAMZA)
#### Post date: [August 15, 2017, 1:30pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/7 "2017-08-15T13:30:12Z")

</div>

Hi,

```bash
PS C:\Users\ha1254ke\KHH006_Analysis> docker run -t -i -v C:\Users\ha1254ke\KHH006_Analysis:/data qiime2/core:2017.7 qiime dada2 denoise-paired --i-demultiplexed-seqs demux-paired-end.qza --o-table table --o-representative-sequences rep-seqs --p-trim-left-f 6 --p-trim-left-r 7 --p-trunc-len-f 300 --p-trunc-len-r 192 --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/tmpiz6h5ne4/forward /tmp/tmpiz6h5ne4/reverse /tmp/tmpiz6h5ne4/output.tsv.biom /tmp/tmpiz6h5ne4/filt_f /tmp/tmpiz6h5ne4/filt_r 300 192 6 7 2.0 2 consensus 1.0 1 1000000

R version 3.3.1 (2016-06-21) 
Loading required package: Rcpp
Warning messages:
1: multiple methods tables found for â€˜arbindâ€™ 
2: multiple methods tables found for â€˜acbindâ€™ 
3: replacing previous import â€˜IRanges::arbindâ€™ by â€˜SummarizedExperiment::arbindâ€™ when loading â€˜GenomicAlignmentsâ€™ 
4: replacing previous import â€˜IRanges::acbindâ€™ by â€˜SummarizedExperiment::acbindâ€™ when loading â€˜GenomicAlignmentsâ€™ 
5: multiple methods tables found for â€˜leftâ€™ 
6: multiple methods tables found for â€˜rightâ€™ 
DADA2 R package version: 1.4.0 
1) Filtering Traceback (most recent call last):
  File "/opt/conda/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 179, in denoise_paired
    run_commands([cmd])
  File "/opt/conda/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 35, in run_commands
    subprocess.run(cmd, check=True)
  File "/opt/conda/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpiz6h5ne4/forward', '/tmp/tmpiz6h5ne4/reverse', '/tmp/tmpiz6h5ne4/output.tsv.biom', '/tmp/tmpiz6h5ne4/filt_f', '/tmp/tmpiz6h5ne4/filt_r', '300', '192', '6', '7', '2.0', '2', 'c
onsensus', '1.0', '1', '1000000']' returned non-zero exit status -9

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.5/site-packages/q2cli/commands.py", line 222, in __call__
    results = action(**arguments)
  File "<decorator-gen-126>", line 2, in denoise_paired
  File "/opt/conda/lib/python3.5/site-packages/qiime2/sdk/action.py", line 201, in callable_wrapper
    output_types, provenance)
  File "/opt/conda/lib/python3.5/site-packages/qiime2/sdk/action.py", line 334, in _callable_executor_
    output_views = callable(**view_args)
  File "/opt/conda/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 194, in denoise_paired
    " and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code -9), please inspect stdout and stderr to learn more.

e[31me[1mPlugin error from dada2:

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

See above for debug info.e[0m

```

---

<div class="post-metadata">

### Author: ![benjjneb](https://forum.qiime2.org/user_avatar/forum.qiime2.org/benjjneb/32/1602_2.png) [@benjjneb](https://forum.qiime2.org/u/benjjneb)
#### Post date: [August 16, 2017, 3:35am UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/8 "2017-08-16T03:35:51Z")

</div>

The log file suggests that errors arose immediately upon encountering the input files, and before they were loaded and filtered.

Can you look again at the input file directory and confirm that the input files are in the appropriate format?

---

<div class="post-metadata">

### Author: ![Mehrbod\_Estaki](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mehrbod_estaki/32/4001_2.png) [@Mehrbod\_Estaki](https://forum.qiime2.org/u/Mehrbod_Estaki)
#### Post date: [August 21, 2017, 4:45pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/9 "2017-08-21T16:45:25Z")

</div>

I'm having the exact the same error log as originally posted here and wanted to clarify.

> [@benjjneb](#):
>
> Can you look again at the input file directory and confirm that the input files are in the appropriate format?

By input _files_ do you just mean the single paired-end-demux.qza file?  
Also, is there a way to check that this artifact has been created properly and is in the appropriate format for dada2? I noticed that this input artifact (~3GB) wouldn't show on qiime2-view, however my demux-summary.qzv [artifact](https://www.dropbox.com/s/6qf2ca1xuju5mn3/demux-summary.qzv?dl=0) shows the interactive plots just fine.

---

<div class="post-metadata">

### Author: ![Mehrbod\_Estaki](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mehrbod_estaki/32/4001_2.png) [@Mehrbod\_Estaki](https://forum.qiime2.org/u/Mehrbod_Estaki)
#### Post date: [August 21, 2017, 7:40pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/11 "2017-08-21T19:40:37Z")

</div>

Turns out the error was related to insufficient memory in my dedicated partition. There was less than 1 Gig left in my partition and so just creating some space solved the issue.

---

<div class="post-metadata">

### Author: ![KEDIR\_HAMZA](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kedir_hamza/32/8261_2.png) [@KEDIR\_HAMZA](https://forum.qiime2.org/u/KEDIR_HAMZA)
#### Post date: [September 6, 2017, 10:40am UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/13 "2017-09-06T10:40:42Z")

</div>

Hi Ben,  
I hope you will excuse me for the late reply. I was on parental leave to take care of my new baby!

I have checked the input files and I think they are in the appropriate format.  
On the other hand, the RAM assigned for the VM (Docker) was 2GB. Based on the suggestion given above, I have increased the RAM allocated for Docker to 8GB and now the script is running for almost 1 hr which was not the case previously. Hope this will solve the problem.

---

<div class="post-metadata">

### Author: ![KEDIR\_HAMZA](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kedir_hamza/32/8261_2.png) [@KEDIR\_HAMZA](https://forum.qiime2.org/u/KEDIR_HAMZA)
#### Post date: [September 6, 2017, 4:43pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/14 "2017-09-06T16:43:47Z")

</div>

Almost 7 hrs, dada2 denoise-paired is still running!

---

<div class="post-metadata">

### Author: ![KEDIR\_HAMZA](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kedir_hamza/32/8261_2.png) [@KEDIR\_HAMZA](https://forum.qiime2.org/u/KEDIR_HAMZA)
#### Post date: [September 18, 2017, 2:15pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/15 "2017-09-18T14:15:15Z")

</div>

Hi,  
I would like to say thank you for your help. Upgrading the RAM size was enough to get it done. Dada2 denoise step has been successfully completed!

---

<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: [October 19, 2017, 8:15pm UTC](https://forum.qiime2.org/t/exit-code-9-from-dada2/998/16 "2017-10-19T20:15:24Z")

</div>

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