Filtering Error in filterAndTrim was encountered while running DADA2 in R (return code 1),

I have been getting the following error after the denoising step:

qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trunc-len-r 0 --p-trunc-len-f 0  --p-max-ee-f 2 --p-max-ee-r 2 --p-trunc-q 2 --p-n-threads 0 --o-table table.qza --o-representative-sequences rep-seqs.qza --o-denoising-stats denoising-stats.

I was not encountering this problem before.This came suddenly. It would be great if anyone could guide me.
The qiime 2 version that am using is qiime2 2020.8

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/tmpffhx6q0z/forward /tmp/tmpffhx6q0z/reverse /tmp/tmpffhx6q0z/output.tsv.biom /tmp/tmpffhx6q0z/track.tsv /tmp/tmpffhx6q0z/filt_f /tmp/tmpffhx6q0z/filt_r 0 0 0 0 2.0 2.0 2 independent consensus 1.0 0 1000000

R version 3.5.1 (2018-07-02) 
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: / RcppParallel: 5.0.0 
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 add(raw()) : internal: buf != <newline>
Error in add(raw()) : internal: buf != <newline>
Error in add(raw()) : internal: buf != <newline>
Error in add(raw()) : internal: buf != <newline>
Error in add(raw()) : internal: buf != <newline>
Execution halted
Traceback (most recent call last):
  File "/home/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_dada2/", line 264, in denoise_paired
  File "/home/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_dada2/", line 36, in run_commands, check=True)
  File "/home/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpffhx6q0z/forward', '/tmp/tmpffhx6q0z/reverse', '/tmp/tmpffhx6q0z/output.tsv.biom', '/tmp/tmpffhx6q0z/track.tsv', '/tmp/tmpffhx6q0z/filt_f', '/tmp/tmpffhx6q0z/filt_r', '0', '0', '0', '0', '2.0', '2.0', '2', '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/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-518>", line 2, in denoise_paired
  File "/home/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/", line 245, in bound_callable
    output_types, provenance)
  File "/home/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/", line 390, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/bioinfo/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_dada2/", 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.

Hi @Richard,

Welcome back to the :qiime2: forum!

This is quite an old version of QIIME 2 - this might not necessarily be the source of the issue, but I think it's worth a shot to eliminate that right out the gate. Can you please install the latest QIIME 2 release (2022.2) and try re-running the commands above?

If this doesn't resolve the issue, I'd recommend checking out this forum post - the user experienced the same issue that you ran into, and there are a few things you can try from that thread.

Hope this helps! Let me know if you're still running into the same error after trying all of the above.

Cheers :lizard:

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