An error encounter after denoising!

Hello , my qiime2 version is 2021-2,
when i gave the following command

qiime dada2 denoise-paired --i-demultiplexed-seqs demux2.qza --p-trunc-len-f 270 --p-trunc-len-r 210 --p-max-ee-f 3 --p-max-ee-r 3 --o-table table.qza --o-representative-sequences rep_seqs.qza --o-denoising-stats denoising_stats.qza --verbose

And getting the following error

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.

Here is more details

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/tmp9_mdwsa6/forward /tmp/tmp9_mdwsa6/reverse /tmp/tmp9_mdwsa6/output.tsv.biom /tmp/tmp9_mdwsa6/track.tsv /tmp/tmp9_mdwsa6/filt_f /tmp/tmp9_mdwsa6/filt_r 270 210 0 0 3.0 3.0 2 independent consensus 1.0 1 1000000

R version 4.0.2 (2020-06-22)
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.6 / RcppParallel: 5.0.2

  1. Filtering Error in add(bin) :
    ‘Calloc’ could not allocate memory (100000000 of 1 bytes)
    Execution halted
    Warning message:
    system call failed: Cannot allocate memory
    Traceback (most recent call last):
    File “/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/”, line 264, in denoise_paired
    File “/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/”, line 36, in run_commands, check=True)
    File “/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/”, line 438, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmp9_mdwsa6/forward’, ‘/tmp/tmp9_mdwsa6/reverse’, ‘/tmp/tmp9_mdwsa6/output.tsv.biom’, ‘/tmp/tmp9_mdwsa6/track.tsv’, ‘/tmp/tmp9_mdwsa6/filt_f’, ‘/tmp/tmp9_mdwsa6/filt_r’, ‘270’, ‘210’, ‘0’, ‘0’, ‘3.0’, ‘3.0’, ‘2’, ‘independent’, ‘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/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/”, line 329, in call
results = action(**arguments)
File “”, line 2, in denoise_paired
File “/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/”, line 245, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/”, line 279, 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.

This is my first time using qiime2 , i’m very sorry for any inconvenience that I may have caused.

Hello @DonDon1224,

Welcome to the forums! :wave:

Thank you for posting your complete command and error. Here’s the important part:

It looks like your computer did not have enough memory / RAM to run this step in the DADA2 pipeline.

Do you have access to a computer with more memory to run this part of the pipeline? :desktop_computer:

Another option is to decrease the number of reads used to train the DADA2 denoising model by adding
--p-n-reads-learn 100000 or
--p-n-reads-learn 10000 to your command.

Using 100k reads or 10k read to train DADA2 is less sensitive, but it does reduce the memory needed and can help you preview your results.

Let us know what you try next!

Thanks a lot!
The error has been solved!