Plugin error from dada2. An error was encountered while running DADA2 in R (return code 1)

I used qiime2-2019.7 to analysis 16S seqs in Linux server. I encountered error when running dada2 denoise-paired step.

Here is my command:
qiime dada2 denoise-paired
–i-demultiplexed-seqs 01demux/demux.qza
–o-table 06dada2/table.qza
–o-representative-sequences 06dada2/rep_seqs.qza
–o-denoising-stats 06dada2/dada2_stats.qza
–p-hashed-feature-ids
–p-trunc-len-f 290 \
–p-trunc-len-r 230
–p-trim-left-f 23
–p-trim-left-r 26
–p-n-threads 8
–verbose

This returns the following error:
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/tmpj1_0n5aa/forward /tmp/tmpj1_0n5aa/reverse /tmp/tmpj1_0n5aa/output.tsv.biom /tmp/tmpj1_0n5aa/track.tsv /tmp/tmpj1_0n5aa/filt_f /tmp/tmpj1_0n5aa/filt_r 0 0 23 26 2.0 2.0 2 consensus 1.0 16 1000000

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

  1. *Filtering Error in filterAndTrim(unfiltsF, filtsF, unfiltsR, filtsR, truncLen = c(truncLenF,  : *
    
  •  These are the errors (up to 5) encountered in individual cores...*
    

Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
Mismatched forward and reverse sequence files: 4861, 4152.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
Mismatched forward and reverse sequence files: 4861, 4152.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
Mismatched forward and reverse sequence files: 4861, 4152.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
Mismatched forward and reverse sequence files: 4861, 4152.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
Mismatched forward and reverse sequence files: 4861, 4152.
Execution halted
Traceback (most recent call last):
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 234, in denoise_paired
run_commands([cmd])
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpj1_0n5aa/forward’, ‘/tmp/tmpj1_0n5aa/reverse’, ‘/tmp/tmpj1_0n5aa/output.tsv.biom’, ‘/tmp/tmpj1_0n5aa/track.tsv’, ‘/tmp/tmpj1_0n5aa/filt_f’, ‘/tmp/tmpj1_0n5aa/filt_r’, ‘0’, ‘0’, ‘23’, ‘26’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘16’, ‘1000000’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py”, line 327, in call
results = action(**arguments)
File “</home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-459>”, line 2, in denoise_paired
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/home/hef/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 249, 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.

I have searched the problem in qiime2 forum, there are some similar topics. But I go through the error detail, there are not exactly the same. So anyone can figure out what’s the problem and how can I correct it . Many thanks.

Welcome to the forum, @zhihui126!

This is because minor details do not match that are specific to your dataset, but the errors can be addressed in the same way.

This is the key part of the error message:

You have different numbers of sequences in your forward and reverse files!

This is almost certainly due to some sort of pre-processing that was performed prior to importing the data to QIIME 2. I recommend not running whatever those steps were (since they are dropping sequences from one file without dropping its pair)

Otherwise please check out those other forum topics that you have already found for troubleshooting advice, armed now with the knowledge that the slight differences probably don’t matter, the problems (and solutions) will still be relevant to you.

Good luck!

A post was split to a new topic: Dada2 Error Code 9

The problem has been solved.:blush: