A dada2 denoise-paired error

Hello, I have imported the data into QIIME2 as demux.qzv,
I’ve use this command to summarize the data:

qiime demux summarize
–i-data demux.qza
–o-visualization demux.qzv

(demux.qzv renamed as ZIP)
demux.zip (322.7 KB)
###I’ve checked all the forward & reverse sequence count by R, they are all the same.
Then I use this command to generate feature tables and representative sequences:

time qiime dada2 denoise-paired
–i-demultiplexed-seqs demux.qza
–p-n-threads 32
–p-trim-left-f 0 --p-trim-left-r 0
–p-trunc-len-f 0 --p-trunc-len-r 0
–o-table dada2-table.qza
–o-representative-sequences dada2-rep-seqs.qza
–o-denoising-stats denoising-stats.qza

Still, I got that error message:


R version 4.0.2 (2020-06-22)
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.6 / RcppParallel: 5.0.2

  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: 4548, 100000.
    Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
    Mismatched forward and reverse sequence files: 100000, 4548.
    Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
    Mismatched forward and reverse sequence files: 4548, 100000.
    Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
    Mismatched forward and reverse sequence files: 100000, 4548.
    Error in (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0, :
    Mismatched forward and reverse sequence files: 4548, 100000.
    Execution halted
    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/tmpd583su6s/forward /tmp/tmpd583su6s/reverse /tmp/tmpd583su6s/output.tsv.biom /tmp/tmpd583su6s/track.tsv /tmp/tmpd583su6s/filt_f /tmp/tmpd583su6s/filt_r 0 0 0 0 2.0 2.0 2 independent consensus 1.0 32 1000000

Traceback (most recent call last):
File “/home/disk/.conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 264, in denoise_paired
run_commands([cmd])
File “/home/disk/.conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/disk/.conda/envs/qiime2-2021.2/lib/python3.6/subprocess.py”, line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpd583su6s/forward’, ‘/tmp/tmpd583su6s/reverse’, ‘/tmp/tmpd583su6s/output.tsv.biom’, ‘/tmp/tmpd583su6s/track.tsv’, ‘/tmp/tmpd583su6s/filt_f’, ‘/tmp/tmpd583su6s/filt_r’, ‘0’, ‘0’, ‘0’, ‘0’, ‘2.0’, ‘2.0’, ‘2’, ‘independent’, ‘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/disk/.conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py”, line 329, in call
results = action(**arguments)
File “”, line 2, in denoise_paired
File “/home/disk/.conda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/home/disk/.conda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/home/disk/.conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 279, 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.


My QIIME2 version is 2021.2, installed via conda
I have no idea what’s going wrong…
PLEASE help me to find out how to solve it, thank you very much!

Hi blueB,

Thanks for reaching out! Happy to take a stab at this one.

The error message you’re receiving seems to be related to the following sample IDs:

E72
E72_3

There is currently a bug within q2-dada2 related to underscores within sample IDs, which is where the ‘mismatched forward and reverse sequence files’ could be stemming from. This bug is being pulled into the 2021.8 dev cycle, so will hopefully be resolved by our next release.

In the meantime - if possible, I’d recommend doing a find and replace on all of your sample IDs to remove the underscores, and replace them with either hyphens, periods, or another delimiter of your choice. Once you’ve done that, try re-running denoise-paired and hopefully you won’t run into that same issue.

Let me know if you have any questions, or are still running into the same error message after making those adjustments!

1 Like

Thank you so much! I will have a try later~
Have a nice day~