Please help me!I use DADA2 to generate ASV table error, request your help!

qiime dada2 denoise-paired
--i-demultiplexed-seqs ./导入的序列/paired-end-demux.qza
--p-trim-left-f 23
--p-trim-left-r 23
--p-trunc-len-f 250
--p-trunc-len-r 250
--o-table ./质控聚类/table.qza
--o-representative-sequences ./质控聚类/rep-seqs.qza
--o-denoising-stats ./质控聚类/denoising-stats.qza
--p-n-threads 0
--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/tmpq32ozyap/forward /tmp/tmpq32ozyap/reverse /tmp/tmpq32ozyap/output.tsv.biom /tmp/tmpq32ozyap/track.tsv /tmp/tmpq32ozyap/filt_f /tmp/tmpq32ozyap/filt_r 250 250 23 23 2.0 2.0 2 12 independent consensus 1.0 0 1000000

R version 4.0.5 (2021-03-31) 
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.7 / RcppParallel: 5.1.4 
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: 51326, 60771.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0,  : 
  Mismatched forward and reverse sequence files: 51326, 60771.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0,  : 
  Mismatched forward and reverse sequence files: 51326, 60771.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0,  : 
  Mismatched forward and reverse sequence files: 51326, 60771.
Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0,  : 
  Mismatched forward and reverse sequence files: 51326, 60771.
Execution halted
Traceback (most recent call last):
  File "/home/qiime2/miniconda/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 266, in denoise_paired
    run_commands([cmd])
  File "/home/qiime2/miniconda/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/qiime2/miniconda/envs/qiime2-2021.11/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpq32ozyap/forward', '/tmp/tmpq32ozyap/reverse', '/tmp/tmpq32ozyap/output.tsv.biom', '/tmp/tmpq32ozyap/track.tsv', '/tmp/tmpq32ozyap/filt_f', '/tmp/tmpq32ozyap/filt_r', '250', '250', '23', '23', '2.0', '2.0', '2', '12', 'independent', '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-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-398>", line 2, in denoise_paired
  File "/home/qiime2/miniconda/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/qiime2/miniconda/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/qiime2/miniconda/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, 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.

Hi @JayZ,

Welcome to the :qiime2: forum! :wave:t3:

This is the the issue - which could be caused by a few different things:

  • Having a differing number sequence counts between your forward and reverse reads.
  • The sequences in one of the two paired files could be out of order with respect to the other.
  • There could be non standard headers in one (or both) of the files that makes the parser "think" the files are mismatched.

This is actually not an uncommon issue - I've linked a few forum posts below, as well as a Github issue that will provide you with a handful of troubleshooting steps you can take to determine the source of this mismatch and how to resolve it.

Hope this helps!

Cheers :lizard:

1 Like

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