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

Hi, I'm running this lines on qiime2:

qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trunc-len-f 235 --p-trunc-len-r 150 --p-trim-left-f 19 --p-trim-left-r 22 --p-n-threads 32 --o-table table.qza --o-representative-sequences rep-seqs.qza

And I heve been getting the following error:

An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

nning 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/tmpkd79pe_u/forward /tmp/tmpkd79pe_u/reverse /tmp/tmpkd79pe_u/output.tsv.biom /tmp/tmpkd79pe_u/filt_f /tmp/tmpkd79pe_u/filt_r 235 150 19 22 2.0 2 consensus 1.0 32 1000000

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

  1. Filtering Error in names(answer) <- names1 :
    'names' attribute [96] must be the same length as the vector [32]
    Execution halted
    Traceback (most recent call last):
    File "/home/qiime2/miniconda/envs/qiime2-2018.2/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 179, in denoise_paired
    run_commands([cmd])
    File "/home/qiime2/miniconda/envs/qiime2-2018.2/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 35, in run_commands
    subprocess.run(cmd, check=True)
    File "/home/qiime2/miniconda/envs/qiime2-2018.2/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpkd79pe_u/forward', '/tmp/tmpkd79pe_u/reverse', '/tmp/tmpkd79pe_u/output.tsv.biom', '/tmp/tmpkd79pe_u/filt_f', '/tmp/tmpkd79pe_u/filt_r', '235', '150', '19', '22', '2.0', '2', 'consensus', '1.0', '32', '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-2018.2/lib/python3.5/site-packages/q2cli/commands.py", line 246, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/qiime2/miniconda/envs/qiime2-2018.2/lib/python3.5/site-packages/qiime2/sdk/action.py", line 228, in bound_callable
output_types, provenance)
File "/home/qiime2/miniconda/envs/qiime2-2018.2/lib/python3.5/site-packages/qiime2/sdk/action.py", line 363, in callable_executor
output_views = self._callable(**view_args)
File "/home/qiime2/miniconda/envs/qiime2-2018.2/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 194, 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.

Please, I need some help! I tried to modify the trim length, but it still doesn't work.

Thanks in advance!

Hey there @Manuss_Ponce!

My understanding (after reading the DADA2 issue tracker) is that this error is likely caused by setting a n-threads value higher than your computer is capable of supporting. How many threads should this computer be able to support? How much memory is available? Thanks! :t_rex: :qiime2:

1 Like

My computer has 8gb RAM. I set threads=FALSE, and then, slowly, it worked :wink:

1 Like

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