# Errors using dada2 denoise-paired with \>16 threads

**URL:** <https://forum.qiime2.org/t/errors-using-dada2-denoise-paired-with-16-threads/13192>\
**Category:** Technical Support\
**Tags:** dada2, parallelization\
**Created:** [January 14, 2020, 4:47pm UTC](https://forum.qiime2.org/t/errors-using-dada2-denoise-paired-with-16-threads/13192 "2020-01-14T16:47:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrichards](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mrichards](https://forum.qiime2.org/u/mrichards)\
**Post date:** [January 14, 2020, 4:47pm UTC](https://forum.qiime2.org/t/errors-using-dada2-denoise-paired-with-16-threads/13192/1 "2020-01-14T16:47:32Z")

</div>

Working through the atacama soils tutorial I've encountered an error when including "--p-n-threads 0". The same error has occured for any thread value over 22 in my testing (machine has 56 threads available).

The problem seems to center on the vector length not matching the number of names. The size of the vector varies from 72 to 74.

_Here is the copy-pasted command and the results using the --verbose argument_  
_In this example the threads used is 24, but this is consistent with the error for any large thread value._

qiime dada2 denoise-paired --verbose   
--i-demultiplexed-seqs demux.qza   
--p-trim-left-f 13   
--p-trim-left-r 13   
--p-trunc-len-f 150   
--p-trunc-len-r 150   
--p-n-threads 24   
--o-table table.qza   
--o-representative-sequences rep-seqs.qza   
--o-denoising-stats denoising-stats.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\_paired.R /tmp/tmpg\_zeokr9/forward /tmp/tmpg\_zeokr9/reverse /tmp/tmpg\_zeokr9/output.tsv.biom /tmp/tmpg\_zeokr9/track.tsv /tmp/tmpg\_zeokr9/filt\_f /tmp/tmpg\_zeokr9/filt\_r 150 150 13 13 2.0 2.0 2 consensus 1.0 24 1000000

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

1. Filtering The filter removed all reads: /tmp/tmpg\_zeokr9/filt\_f/YUN2029.3\_65\_L001\_R1\_001.fastq.gz and /tmp/tmpg\_zeokr9/filt\_r/YUN2029.3\_65\_L001\_R2\_001.fastq.gz not written.  
**Error in sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) : \*\*  
\*\* write error, closing pipe to the master**  
**Error in names(answer) \<- names1 : \*\*  
\*\* 'names' attribute [75] must be the same length as the vector [72]**  
Execution halted  
Traceback (most recent call last):  
File "/home/abletha689957dl/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2\_dada2/\_denoise.py", line 257, in denoise\_paired  
run\_commands([cmd])  
File "/home/abletha689957dl/anaconda3/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/abletha689957dl/anaconda3/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/tmpg\_zeokr9/forward', '/tmp/tmpg\_zeokr9/reverse', '/tmp/tmpg\_zeokr9/output.tsv.biom', '/tmp/tmpg\_zeokr9/track.tsv', '/tmp/tmpg\_zeokr9/filt\_f', '/tmp/tmpg\_zeokr9/filt\_r', '150', '150', '13', '13', '2.0', '2.0', '2', 'consensus', '1.0', '24', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File "/home/abletha689957dl/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2cli/commands.py", line 328, in **call**  
results = action(\*\*arguments)  
File "\</home/abletha689957dl/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/decorator.py:decorator-gen-459\>", line 2, in denoise\_paired  
File "/home/abletha689957dl/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound\_callable  
output\_types, provenance)  
File "/home/abletha689957dl/anaconda3/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/abletha689957dl/anaconda3/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.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [January 14, 2020, 5:51pm UTC](https://forum.qiime2.org/t/errors-using-dada2-denoise-paired-with-16-threads/13192/2 "2020-01-14T17:51:44Z")

</div>

Welcome to the forum @mrichards!

See an explanation here:

> [@Denoising error, names attribute must be the same length as vector](https://forum.qiime2.org/t/denoising-error-names-attribute-must-be-the-same-length-as-vector/12058/2):
>
> Hi @Roger_Huerlimann, Congratulations for running into one of the more cryptic error messages that dada2 can throw at you. This is effectively a memory error even though it does not look like one — or more specifically a multithreading issue that can be fixed by reducing the number of threads used. See here for some discussion: [https://forum.qiime2.org/t/dada2-error-return-code-1/7140?u=nicholas\_bokulich](https://forum.qiime2.org/t/dada2-error-return-code-1/7140) I think the dada2 version was upgraded somewhere in there, so it could be a version issu…
