An error was encountered while running DADA2 in R (return code -9), Not CPU or Memory problem.

Dear All,

I got a bunch of topics about this problem, but I don't think that mine is also a computing resource problem.

When I ran the command below,

qiime dada2 denoise-single --i-demultiplexed-seqs demux.qza --p-n-threads 32 --p-trim-left 1 --p-trunc-len 275 --o-representative-sequences rep-seqs-dada2.qza --o-table table-dada2.qza --o-denoising-stats stats-dada2.qza

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

and log file said,

R version 3.5.1 (2018-07-02)
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: 1.0.4.6 / RcppParallel: 5.0.0

  1. Filtering ................................................
  2. Learning Error Rates
    288462816 total bases in 1052784 reads from 15 samples will be used for learning the error rates.
    Traceback (most recent call last):
    File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 181, in _denoise_single
    run_commands([cmd])
    File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
    File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['run_dada_single.R', '/tmp/qiime2-archive-jy8942t6/d58bea33-37ad-4cc7-8409-57f1f5a517c2/data', '/tmp/tmpd1sw9pdu/output.tsv.biom', '/tmp/tmpd1sw9pdu/track.tsv', '/tmp/tmpd1sw9pdu', '275', '1', '2.0', '2', 'Inf', 'independent', 'consensus', '1.0', '24', '1000000', 'NULL', '16']' died with <Signals.SIGKILL: 9>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2cli/commands.py", line 329, in call
results = action(**arguments)
File "", line 2, in denoise_single
File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
output_types, provenance)
File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in callable_executor
output_views = self._callable(**view_args)
File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 218, in denoise_single
band_size='16')
File "/home01/r798a01/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 192, in _denoise_single
" 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.

Most of the answers to this topic were about core numbers or memory problems.

But, I got 48 cores and 385Gb memory. I only ran dada2 not anything else and my free memory was 275 Gb.. But I still got the same problem.

I'm trying to reduce the reads numbers for error modeling using '--p-n-reads-learn', but still got the same problem...

Is there anyone solve this problem without any computing resources?

Thanks,
Jun

Hello @junkim83. 385gigs is a lot of memory! Are you sure that’s the amount of memory (RAM) the computer has not the storage (hard drive space)? I ask because we see people get these mixed up a lot.

Additionally, what version of QIIME 2 are you running, and what kind of environment are you running it on (native install, virtual machine, hpc, etc.)?

Hi @Oddant1

Yes, My machine has 385G of RAM. I double-checked. I bought this for the data analysis.
I used both 2020.6 and 2020.2 versions and showed same error in both versions. I installed it as native.

Hello @junkim83,

That Signal means the OS killed R while it was running dada2. The trace back doesn’t seem to give any hints as to why the OS would have killed the process.

Have you verified that you aren’t running out of memory? You have a lot, but if your data set is particularly large or you’re dong a lot of things in the background you could still run out.

It looks like you’ve run this process multiple times and gotten the same error every time. Does the process run for a significant amount of time before producing the error, or does it happen very quickly?

What version of Linux are you using to run this?

EDIT: Additionally, in the OP the command you run uses 32 threads which will significantly increase memory usage. Have you tried reducing this number?

1 Like

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