I know this has been posted multiple times but I am getting this error in the denoising step if DADA 2
Denoise remaining samples …Error in dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), :
Memory allocation failed.
Calls: dada -> dada_uniques -> .Call
Execution halted
Warning message:
system call failed: Cannot allocate memory
Traceback (most recent call last):
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 152, in _denoise_single
run_commands([cmd])
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/tmp/qiime2-archive-45zo3p1n/b9a37e4e-ee08-47f3-8f07-b643d768e68e/data’, ‘/tmp/tmpd1qnfzkg/output.tsv.biom’, ‘/tmp/tmpd1qnfzkg/track.tsv’, ‘/tmp/tmpd1qnfzkg’, ‘294’, ‘0’, ‘2.0’, ‘2’, ‘Inf’, ‘consensus’, ‘1.0’, ‘0’, ‘1000’, ‘NULL’, ‘16’]’ returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “</home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-440>”, line 2, in denoise_single
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 365, in callable_executor
output_views = self._callable(**view_args)
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 187, in denoise_single
band_size=‘16’)
File “/home/basilin/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_dada2/_denoise.py”, 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.
I'm glad you did a 'literature review' about this error What did you learn about this error? Do you want to mention how much memory or RAM your computer has?
You really have reduced the number of reads! Have you tried adjusting the threads? Passing –p-n-threads 0 will use the maximum number of threads. I wonder if using –p-n-threads 2 would also reduce memory usage. Have you tried it?
Is this a shared system being used by other people? Could you restart the computer and make sure you are the only one using it?
I should have asked this sooner, but are you running this on OSX/Linux or on a Windows VM? If you are using a VM, how much memory have you allocated to it?
Thanks for answering so many questions. I hope I can answer your question soon.
Colin
I’m totally out of ideas. I think 16GB would be enough to process 11M reads, so I’m not sure what’s going on. Let’s see what the dada2 dev thinks: @benjjneb
How many samples are in this dataset? And what is the sequencing technology?
My suspicion is that one very large or very noisy (or both) sample is exceeding the 16GB of memory even when dereplicated. This can happen when there are a very large number of unique sequences, as it is that number, not the raw number of reads, that controls the peak memory requirements.
There are 224 samples in the dataset and illumina sequencing was used. Also to perform demultiplexing of the sequence I have used cutadapt this is the command that I used:
qiime cutadapt demux-single
–i-seqs single_end_sequence/single_end_sequence.qza
–m-barcodes-file metadata.tsv
–m-barcodes-column BarcodeSequence
–p-error-rate 0
–o-per-sample-sequences demultiplexed-seqs.qza
–o-untrimmed-sequences untrimmed.qza
–verbose
I’m sorry for the late response. But it worked for me when I used qiime1 to extract the barcode sequences and perform the steps from moving pictures tutorial. I believe it could be a result of me using cutadapt to demultiplex the sequences, because that’s the only thing I did differently.