dada2 system call failed: Cannot allocate memory

Hopefully someone can help me figure this out. I have gotten this error over and over, have followed the below steps to prevent it (from 2 links) and am not sure what I am doing wrong. Any help is more than appreciated!

(qiime2-2019.1) [email protected]:~/18S$
qiime dada2 denoise-single
–i-demultiplexed-seqs trimmed-remove-primers.qza
–p-trim-left 0
–p-trunc-len 254
–o-representative-sequences rep-seqs-dada2.qza
–o-table table-dada2.qza
–o-denoising-stats stats-dada2.qza

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_single.R /tmp/q2-SingleLanePerSampleSingleEndFastqDirFmt-zq0hs0zs /tmp/tmpj2pueyp1/output.tsv.biom /tmp/tmpj2pueyp1/track.tsv /tmp/tmpj2pueyp1 27 0 2.0 2 Inf consensus 1.0 1 1000000 NULL 16

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

  1. Filtering Error: cannot allocate vector of size 95.4 Mb
    Execution halted
    Warning message:
    system call failed: Cannot allocate memory
    Traceback (most recent call last):
    File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/”, line 152, in _denoise_single
    File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/”, line 36, in run_commands, check=True)
    File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/”, line 418, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/tmp/q2-SingleLanePerSampleSingleEndFastqDirFmt-zq0hs0zs’, ‘/tmp/tmpj2pueyp1/output.tsv.biom’, ‘/tmp/tmpj2pueyp1/track.tsv’, ‘/tmp/tmpj2pueyp1’, ‘27’, ‘0’, ‘2.0’, ‘2’, ‘Inf’, ‘consensus’, ‘1.0’, ‘1’, ‘1000000’, ‘NULL’, ‘16’]’ 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-2019.1/lib/python3.6/site-packages/q2cli/”, line 274, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/>”, line 2, in denoise_single
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/”, line 231, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/”, line 365, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/”, line 187, in denoise_single
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/”, line 163, in _denoise_single
" 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.

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.

I would like to add that whenever i solve Error Code 1, i continually get error code -9. These alternate repeatedly.

Welcome to the forum, @ebriese!

You are getting two variants of the same problem: memory errors. Error Code 1 is annoying because you need to read through the log to figure out what went wrong (e.g., the error code 1 forum topic that you linked to is for a different problem if you read the “fine print”), but error code -9 is quite unambiguously a memory error, and there are lots of forum topics discussing this.

Here is the key line in your error code 1:

I suggest checking out the forum archive to see how others managed that error; unfortunately, for dada2 the solution almost always is that you need to get access to a more powerful computer:

How much RAM do you have on your computer? Do you have access to an institutional cluster or another computer in your lab that can handle this dataset?