dada2 denoise-ccs, plugin error [return code 1]

Hi, I have 90 pacbio seqs for 16S rRNA amplicon analysis. I encountered an error message with dada2 denoise-ccs step.

Followings is my command.
qiime dada2 denoise-ccs
--i-demultiplexed-seqs result/single-end-demux.qza
--p-min-len 1000
--p-max-len 1600
--p-trim-left 25
--p-n-threads 0
--o-representative-sequences result/rep-seqs.qza
--o-table result/table.qza
--o-denoising-stats result/stats.qza

And the error log is following.

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.R --input_directory /tmp/qiime2/stapler/data/6c3f4346-13ff-4cc9-a89d-396bf46b559f/data --output_path /tmp/tmpymrkpdk1/output.tsv.biom --output_track /tmp/tmpymrkpdk1/track.tsv --removed_primer_directory /tmp/tmpymrkpdk1/nop --filtered_directory /tmp/tmpymrkpdk1/filt --forward_primer AGRGTTYGATYMTGGCTCAG --reverse_primer AAGTCGTAACAAGGTARCY --max_mismatch 2 --indels False --truncation_length 0 --trim_left 25 --max_expected_errors 2.0 --truncation_quality_score 2 --min_length 1000 --max_length 1600 --pooling_method independent --chimera_method consensus --min_parental_fold 3.5 --allow_one_off False --num_threads 0 --learn_min_reads 1000000 --homopolymer_gap_penalty NULL --band_size 32

Warning message:
package ‘optparse’ was built under R version 4.2.3
R version 4.2.2 (2022-10-31)
Loading required package: Rcpp
DADA2: 1.26.0 / Rcpp: 1.0.11 / RcppParallel: 5.1.6

  1. Removing Primers
    Multiple matches to the primer(s) in some sequences. Using the longest possible match.
    7837 sequences out of 17310 are being reverse-complemented.
    Error in sapply(match.fwd, end) + 1 :
    non-numeric argument to binary operator
    3: removePrimers(unfilts, nop, primer, dada2:::rc(primerR), max.mismatch = maxMismatch,
    allow.indels = indels, orient = TRUE, verbose = TRUE)
    2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
    classes)) tryInvokeRestart("muffleWarning"))
    1: suppressWarnings(removePrimers(unfilts, nop, primer, dada2:::rc(primerR),
    max.mismatch = maxMismatch, allow.indels = indels, orient = TRUE,
    verbose = TRUE))
    Traceback (most recent call last):
    File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/", line 440, in denoise_ccs
    File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/", line 36, in run_commands, check=True)
    File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/", line 516, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/qiime2/stapler/data/6c3f4346-13ff-4cc9-a89d-396bf46b559f/data', '--output_path', '/tmp/tmpymrkpdk1/output.tsv.biom', '--output_track', '/tmp/tmpymrkpdk1/track.tsv', '--removed_primer_directory', '/tmp/tmpymrkpdk1/nop', '--filtered_directory', '/tmp/tmpymrkpdk1/filt', '--forward_primer', 'AGRGTTYGATYMTGGCTCAG', '--reverse_primer', 'AAGTCGTAACAAGGTARCY', '--max_mismatch', '2', '--indels', 'False', '--truncation_length', '0', '--trim_left', '25', '--max_expected_errors', '2.0', '--truncation_quality_score', '2', '--min_length', '1000', '--max_length', '1600', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '3.5', '--allow_one_off', 'False', '--num_threads', '0', '--learn_min_reads', '1000000', '--homopolymer_gap_penalty', 'NULL', '--band_size', '32']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/", line 520, in call
results = self._execute_action(
File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/", line 581, in _execute_action
results = action(**arguments)
File "", line 2, in denoise_ccs
File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/", line 342, in bound_callable
outputs = self.callable_executor(
File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/usr/local/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/", line 449, in denoise_ccs
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.

Here is demux file
single-end-demux-summary.qzv (340.7 KB)

I really appreciate your help in advance.

1 Like

Hi @stapler,
Welcome to the :qiime2: forum!
When I searched the forum for a similar issue I found this post which lead me to wonder if maybe it is the case that your sequences are being removed because they do not contain primers? If this is true maybe you can try again but skip the primer removal step. If this isn't true let me know and we can keep trying to figure it out here!

Thank you for the reply, @jphagen .

Can I run DADA2's denoise-ccs without primer information? It seems that denoise-ccs requires primer sequences. I might run denoise-single instead. However, I would like to understand the differences between denoise-single and denoise-ccs. Could you explain this to me?

Thank you again.

Problem solved.

Essentially, it is related to primer sequences. Unlike the '--p-front' parameter, the '--p-adapter' parameter does not try to match the reverse complementary sequence. I replaced '--p-adapter AAGTCGTAACAAGGTARCY' with '--p-adapter RGYTACCTTGTTACGACTT', and it worked. However, the actual reverse primer sequences for PCR reactions are the reverse complementary sequences of the target loci by their nature. Therefore, it might be better to add a reverse-complementary option for the '--p-adapter' parameter.


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