Plugin error from dada2 trying to truncate and denoise after trimming primers with cutadapt

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 see there are other topics about the same error, but I can't seem to find the specific help for my case. I trimmed the primers off with cutadapt and was trying to proceed with truncating and denoising with dada2 when I had the error running the following code:

 qiime dada2 denoise-paired \
> --i-demultiplexed-seqs trimmedbov.qza \
> --p-trunc-len-f 305 \
> --p-trunc-len-r 185 \
> --o-table bovtable.qza \
> --o-representative-sequences bovrep-seqs.qza \
> --o-denoising-stats bovdenoising-stats.qza \
> --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/tmpgkyztt_t/forward /tmp/tmpgkyztt_t/reverse /tmp/tmpgkyztt_t/output.tsv.biom /tmp/tmpgkyztt_t/track.tsv /tmp/tmpgkyztt_t/filt_f /tmp/tmpgkyztt_t/filt_r 305 185 0 0 2.0 2.0 2 12 independent consensus 1.0 1 1000000

R version 4.1.2 (2021-11-01)
Loading required package: Rcpp
DADA2: 1.22.0 / Rcpp: 1.0.8.3 / RcppParallel: 5.1.5
1) Filtering The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210511155292-1-2-1_S160_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210511155292-1-2-1_S160_L001_R2_001.fastq.gz not written.
The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210629100319-1-2-1_S369_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210629100319-1-2-1_S369_L001_R2_001.fastq.gz not written.
The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210629100320-2-1-1_S177_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210629100320-2-1-1_S177_L001_R2_001.fastq.gz not written.
The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210629100322-2-1-1_S181_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210629100322-2-1-1_S181_L001_R2_001.fastq.gz not written.
The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210629100324-2-1-1_S183_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210629100324-2-1-1_S183_L001_R2_001.fastq.gz not written.
The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210629100325-1-2-1_S370_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210629100325-1-2-1_S370_L001_R2_001.fastq.gz not written.
The filter removed all reads: /tmp/tmpgkyztt_t/filt_f/210629100326-3-3-1_S374_L001_R1_001.fastq.gz and /tmp/tmpgkyztt_t/filt_r/210629100326-3-3-1_S374_L001_R2_001.fastq.gz not written.
Some input samples had no reads pass the filter.
.x..xx.xxxx
2) Learning Error Rates
5795 total bases in 19 reads from 4 samples will be used for learning the error rates.
3515 total bases in 19 reads from 4 samples will be used for learning the error rates.
3) Denoise samples ....
....
4) Remove chimeras (method = consensus)
Error in isBimeraDenovoTable(unqs[[i]], ..., verbose = verbose) :
  Input must be a valid sequence table.
Calls: removeBimeraDenovo -> isBimeraDenovoTable
Execution halted
Traceback (most recent call last):
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, in denoise_paired
    run_commands([cmd])
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpgkyztt_t/forward', '/tmp/tmpgkyztt_t/reverse', '/tmp/tmpgkyztt_t/output.tsv.biom', '/tmp/tmpgkyztt_t/track.tsv', '/tmp/tmpgkyztt_t/filt_f', '/tmp/tmpgkyztt_t/filt_r', '305', '185', '0', '0', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '1', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-450>", line 2, in denoise_paired
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/isissilveira/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 292, 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.

I would appreciate it if anyone could help me!

Hi @microbiotaphyto,

Thanks for your patience here! :slightly_smiling_face:

This error essentially means that your reads were not able to be merged. This is typically due to trim/trunc settings that have removed too many reads, which will produce an insufficient overlap between your forward/reverse reads - hence, preventing any merging from occurring.

My first recommendation here would be to relax your trim/trunc settings a bit to see if that resolves the issue - but with that being said, this error may also occur with really poor read quality as well. If relaxing your trim/trunc settings doesn't resolve the issue, you can also proceed by just using your forward or reverse reads.

Hope this helps! :lizard:

1 Like

Hello there!

I tried relaxing truncation settings and kept having the same issue. Then I noticed one position with qs = 20 in the forward reads, that I hadn't been truncating. Once I included it in the truncation settings, everything went well! I think dada2 was removing too many reads when filtering, because of that.

Than you so much for your help!!

1 Like

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