[2023] An error was encountered while running DADA2 in R (return code 1)

I am new to this. I have paired-end 16S sequencing data, I already received them demultiplexed. First I import the data successfully with:

time qiime tools import \
--type SampleData[PairedEndSequencesWithQuality] \
--input-path /home/kratz/ak_q/manifest.tsv \
--output-path ak_mirai_demux_paired_end.qza \
--input-format PairedEndFastqManifestPhred33V2

Then I want to make a "feature table" (?):

time qiime dada2 denoise-paired \
--p-n-threads 0 \
--i-demultiplexed-seqs ak_mirai_demux_paired_end.qza \
--p-trim-left-f 17 \
--p-trim-left-r 21 \
--p-trunc-len-f 220 \
--p-trunc-len-r 220 \
--o-representative-sequences ak_representative-sequences.qza \
--o-table ak_table.qza \
--o-denoising-stats ak_denoising-stats.qza

I get the error: An error was encountered while running DADA2 in R (return code 1)

Stderr is:

Loading required package: Rcpp
Error in add(bin) : 
  'R_Calloc' could not allocate memory (34702291 of 1 bytes)
11: .Call(.streamer_add, sampler, bin, c(skips[ith], adds[ith]))
10: add(bin)
9: x$yield(...)
8: yield(f, qualityType = qualityType)
7: yield(f, qualityType = qualityType)
6: withCallingHandlers(expr, warning = function(w) if (inherits(w, 
       classes)) tryInvokeRestart("muffleWarning"))
5: suppressWarnings(fq <- yield(f, qualityType = qualityType))
4: derepFastq(fls[[i]], qualityType = qualityType)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w, 
       classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
Traceback (most recent call last):
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 326, in denoise_paired
    run_commands([cmd])
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/tmp4tok88ym/forward', '--input_directory_reverse', '/tmp/tmp4tok88ym/reverse', '--output_path', '/tmp/tmp4tok88ym/output.tsv.biom', '--output_track', '/tmp/tmp4tok88ym/track.tsv', '--filtered_directory', '/tmp/tmp4tok88ym/filt_f', '--filtered_directory_reverse', '/tmp/tmp4tok88ym/filt_r', '--truncation_length', '220', '--truncation_length_reverse', '220', '--trim_left', '17', '--trim_left_reverse', '21', '--max_expected_errors', '2.0', '--max_expected_errors_reverse', '2.0', '--truncation_quality_score', '2', '--min_overlap', '12', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '0', '--learn_min_reads', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/commands.py", line 468, in __call__
    results = action(**arguments)
  File "<decorator-gen-72>", line 2, in denoise_paired
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound_callable
    outputs = self._callable_executor_(
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 509, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/kratz/miniconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 339, in denoise_paired
    raise Exception("An error was encountered while running DADA2"
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.

Stdout is:

R version 4.2.3 (2023-03-15) 
DADA2: 1.26.0 / Rcpp: 1.0.10 / RcppParallel: 5.1.6 
2) Filtering ......................................................................................................................
3) Learning Error Rates
208876241 total bases in 1028947 reads from 13 samples will be used for learning the error rates.
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.R --input_directory /tmp/tmp4tok88ym/forward --input_directory_reverse /tmp/tmp4tok88ym/reverse --output_path /tmp/tmp4tok88ym/output.tsv.biom --output_track /tmp/tmp4tok88ym/track.tsv --filtered_directory /tmp/tmp4tok88ym/filt_f --filtered_directory_reverse /tmp/tmp4tok88ym/filt_r --truncation_length 220 --truncation_length_reverse 220 --trim_left 17 --trim_left_reverse 21 --max_expected_errors 2.0 --max_expected_errors_reverse 2.0 --truncation_quality_score 2 --min_overlap 12 --pooling_method independent --chimera_method consensus --min_parental_fold 1.0 --allow_one_off False --num_threads 0 --learn_min_reads 1000000

Please, help.

Have you searched for the problem on the forum?

Yes but some of the answers are very old and in any case do not help me resolve this specific instance of the issue.

Good afternoon,

Here's the main error:

How much memory / RAM does this computer have?

Do you have access to any computers with more memory?

1 Like

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