Error in dada2 denoising-paired (return to code 1)

Hello,
I installed qiime 2 2018.8 in a VirtualBox, and I haven´t been able to run dada2 without getting this legend “An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.”
I am using the following code:
qiime dada2 denoise-paired --i-demultiplexed-seqs demux-paired-end.qza --p-trunc-len-f 0 --p-trunc-len-r 0 --p-trim-left-f 0 --p-trim-left-r 0 --p-n-threads 0 --p-n-reads-learn 999999 --o-representative-sequences rep-seqs-dada2.qza --o-table table-dada2.qza --o-denoising-stats stats-dada2.qza

And the complete error message is the following:
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/tmpybvky3gc/forward /tmp/tmpybvky3gc/reverse /tmp/tmpybvky3gc/output.tsv.biom /tmp/tmpybvky3gc/track.tsv /tmp/tmpybvky3gc/filt_f /tmp/tmpybvky3gc/filt_r 0 0 0 0 2.0 2 consensus 1.0 0 999999

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

  1. Filtering Error in filterAndTrim(unfiltsF, filtsF, unfiltsR, filtsR, truncLen = c(truncLenF, :
    These are the errors (up to 5) encountered in individual cores…
    Error in add(bin) :
    ‘Calloc’ could not allocate memory (100000000 of 1 bytes)
    Error in add(bin) :
    ‘Calloc’ could not allocate memory (100000000 of 1 bytes)
    Error in add(bin) :
    ‘Calloc’ could not allocate memory (100000000 of 1 bytes)
    Error in add(bin) :
    ‘Calloc’ could not allocate memory (100000000 of 1 bytes)
    Error in add(bin) :
    ‘Calloc’ could not allocate memory (100000000 of 1 bytes)
    Execution halted
    Traceback (most recent call last):
    File “/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 229, in denoise_paired
    run_commands([cmd])
    File “/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
    subprocess.run(cmd, check=True)
    File “/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/subprocess.py”, line 398, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpybvky3gc/forward’, ‘/tmp/tmpybvky3gc/reverse’, ‘/tmp/tmpybvky3gc/output.tsv.biom’, ‘/tmp/tmpybvky3gc/track.tsv’, ‘/tmp/tmpybvky3gc/filt_f’, ‘/tmp/tmpybvky3gc/filt_r’, ‘0’, ‘0’, ‘0’, ‘0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘0’, ‘999999’]’ returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in denoise_paired
File “/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 362, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2018.8/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.

Good morning,

Thanks for posting that full error message. While error messages always included lot’s of extra information, I looked for clues about what could be causing the true error. :mag:

I think I found the error:

Looks like you are running out of memory when running dada2. How much memory / RAM have you allocated to your virtualbox? How much memory is on the host machine that’s running the vm?

I know dada2 needs a bunch of memory, so this could be an issue.

Colin

1 Like

Hello, thank you for answering.

I allocated 2 GB of base memory in my virtualbox and it has 2 processors, the machine has 1 TB

Ok! dada2 will need a lot more than 2 GB of RAM. Try closing down the VM, increase the VM memory allocation, and running this script again. While you are at it, you could increase the number of processes given to the VM as well.

When I use a VM, I give it as much memory and CPU cores as possible so that the VM can process data quickly. :rocket:

Colin

2 Likes

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