An error was encountered while running DADA2 in R (return code 1). 'names' attribute [48] must be the same length as the vector [24]

I’m using qiime2-2019.10. My target sequence is 16S V3-V4, about 465 nts,
here is my qzv file of imported data paired-end-demux.qzv (292.7 KB)

and I ran the --verbose as suggested in other threads. below is what I got:

qiime dada2 denoise-paired \

–i-demultiplexed-seqs 2_imported/paired-end-demux.qza
–p-trunc-len-f 299
–p-trunc-len-r 202
–p-trim-left-f 17
–p-trim-left-r 21
–p-chimera-method consensus
–p-n-threads 0
–o-table 3_DADA2/table_dada2.qza
–o-denoising-stats 3_DADA2/denoising-stats.qza
–o-representative-sequences 3_DADA2/rep_seqs.qza
–verbose
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/tmpbhdbmw37/forward /tmp/tmpbhdbmw37/reverse /tmp/tmpbhdbmw37/output.tsv.biom /tmp/tmpbhdbmw37/track.tsv /tmp/tmpbhdbmw37/filt_f /tmp/tmpbhdbmw37/filt_r 288 219 17 21 2.0 2.0 2 consensus 1.0 0 1000000

R version 3.5.1 (2018-07-02)
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: 1.0.2 / RcppParallel: 4.4.4

  1. Filtering Error in names(answer) <- names1 :
    ‘names’ attribute [48] must be the same length as the vector [24]
    Execution halted
    Traceback (most recent call last):
    File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 257, in denoise_paired
    run_commands([cmd])
    File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
    subprocess.run(cmd, check=True)
    File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/subprocess.py”, line 418, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpbhdbmw37/forward’, ‘/tmp/tmpbhdbmw37/reverse’, ‘/tmp/tmpbhdbmw37/output.tsv.biom’, ‘/tmp/tmpbhdbmw37/track.tsv’, ‘/tmp/tmpbhdbmw37/filt_f’, ‘/tmp/tmpbhdbmw37/filt_r’, ‘288’, ‘219’, ‘17’, ‘21’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘0’, ‘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-2019.10/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/decorator.py:decorator-gen-459>”, line 2, in denoise_paired
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 272, 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.

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.

@Liang_Cheng, your error is probably the same as in these topics: (1, 2) - an out of memory error that usually occurs when using many threads.

Try setting --p-n-threads to a fixed number that is smaller than the max number of cores on your system (0 uses all available cores). Two or four might be a good place to start, and you can tweak the settings from there.

Let me know how that goes,
Chris :dove:

Hi @ChrisKeefe ,

Thank you so much for your fast reply! I also saw one of the topics and I tried to use 2 cores instead. However I’m still getting the same error. I am using a virtual machine but this is not a extremely large dataset. Please let me know what you think. Thank you.

qiime dada2 denoise-paired
–i-demultiplexed-seqs 2_imported/paired-end-demux.qza
–p-trunc-len-f 288
–p-trunc-len-r 219
–p-trim-left-f 17
–p-trim-left-r 21
–p-chimera-method consensus
–p-n-threads 2
–o-table 3_DADA2/table_dada2.qza
–o-denoising-stats 3_DADA2/denoising-stats.qza
–o-representative-sequences 3_DADA2/rep_seqs.qza
–verbose

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/tmp1kvnmt3w/forward /tmp/tmp1kvnmt3w/reverse /tmp/tmp1kvnmt3w/output.tsv.biom /tmp/tmp1kvnmt3w/track.tsv /tmp/tmp1kvnmt3w/filt_f /tmp/tmp1kvnmt3w/filt_r 288 219 17 21 2.0 2.0 2 consensus 1.0 2 1000000

R version 3.5.1 (2018-07-02)
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: 1.0.2 / RcppParallel: 4.4.4

  1. Filtering Error in names(answer) <- names1 :
    ‘names’ attribute [48] must be the same length as the vector [24]
    Execution halted
    Traceback (most recent call last):
    File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 257, in denoise_paired
    run_commands([cmd])
    File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
    subprocess.run(cmd, check=True)
    File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/subprocess.py”, line 418, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmp1kvnmt3w/forward’, ‘/tmp/tmp1kvnmt3w/reverse’, ‘/tmp/tmp1kvnmt3w/output.tsv.biom’, ‘/tmp/tmp1kvnmt3w/track.tsv’, ‘/tmp/tmp1kvnmt3w/filt_f’, ‘/tmp/tmp1kvnmt3w/filt_r’, ‘288’, ‘219’, ‘17’, ‘21’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘2’, ‘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-2019.10/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/decorator.py:decorator-gen-459>”, line 2, in denoise_paired
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 272, 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.

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.

Actually, I lowered the core number to 1 :joy: … and it seems to be working now.

I will let you know if it went through the whole process.

Thank you again for your help.

And more update:
For folks using Linux virtual machine, assigning more memory and cpu cores to the Qiime machine could help situations like this.

1 Like

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