DADA2 error from ITS sequences

Hello there,

I'm working with ITS sequences from 45 samples in total. They were sequenced through an Illumina Novaseq 6000 instrument. Using the last version of QIIME2 (2023.5), my problem occurs while I perform the denoising analysis through dada2 with the following command:

qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trunc-len-f 155 --p-trunc-len-r 155 --p-trim-left-f 2 --p-trim-left-r 2 --p-n-threads 0 --o-table table_ITS --output-dir stats_dada/ --verbose --o-denoising-stats table_stats_ITS

based on this demultiplexing plot:

QIIME_RawData_QualityPlot_ITS.qzv (312.4 KB)

The error message is the following:

qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trunc-len-f 155 --p-trunc-len-r 155 --p-trim-left-f 2 --p-trim-left-r 2 --p-n-threads 0 --o-table table_ITS --output-dir stats_dada/ --verbose --o-denoising-stats table_stats_ITS
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/tmpcbsngj63/forward --input_directory_reverse /tmp/tmpcbsngj63/reverse --output_path /tmp/tmpcbsngj63/output.tsv.biom --output_track /tmp/tmpcbsngj63/track.tsv --filtered_directory /tmp/tmpcbsngj63/filt_f --filtered_directory_reverse /tmp/tmpcbsngj63/filt_r --truncation_length 155 --truncation_length_reverse 155 --trim_left 2 --trim_left_reverse 2 --max_expected_errors 2.0 --max_expected_errors_reverse 2.0 --truncation_quality_score 2 --min_overlap 12 --pooling_method independent --chimera_method consensus --min_parental_fold 1.0 --allow_one_off False --num_threads 0 --learn_min_reads 1000000

R version 4.2.3 (2023-03-15)
Loading required package: Rcpp
DADA2: 1.26.0 / Rcpp: 1.0.10 / RcppParallel: 5.1.6
2) Filtering Error in names(answer) <- names1 :
  'names' attribute [45] must be the same length as the vector [38]
4: mcmapply(fastqPairedFilter, mapply(c, fwd, rev, SIMPLIFY = FALSE),
       mapply(c, filt, filt.rev, SIMPLIFY = FALSE), MoreArgs = list(truncQ = truncQ,
           truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight,
           maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ,
           maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex,
           orient.fwd = orient.fwd, matchIDs = matchIDs, id.sep = id.sep,
           id.field = id.field, n = n, OMP = OMP, qualityType = qualityType,
           compress = compress, verbose = verbose), mc.cores = ncores,
       mc.silent = TRUE)
3: filterAndTrim(unfilts, filts, unfiltsR, filtsR, truncLen = c(truncLen,
       truncLenR), trimLeft = c(trimLeft, trimLeftR), maxEE = c(maxEE,
       maxEER), truncQ = truncQ, rm.phix = TRUE, multithread = multithread)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
       classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(filterAndTrim(unfilts, filts, unfiltsR, filtsR,
       truncLen = c(truncLen, truncLenR), trimLeft = c(trimLeft,
           trimLeftR), maxEE = c(maxEE, maxEER), truncQ = truncQ,
       rm.phix = TRUE, multithread = multithread))
Traceback (most recent call last):
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 326, in denoise_paired
    run_commands([cmd])
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/tmpcbsngj63/forward', '--input_directory_reverse', '/tmp/tmpcbsngj63/reverse', '--output_path', '/tmp/tmpcbsngj63/output.tsv.biom', '--output_track', '/tmp/tmpcbsngj63/track.tsv', '--filtered_directory', '/tmp/tmpcbsngj63/filt_f', '--filtered_directory_reverse', '/tmp/tmpcbsngj63/filt_r', '--truncation_length', '155', '--truncation_length_reverse', '155', '--trim_left', '2', '--trim_left_reverse', '2', '--max_expected_errors', '2.0', '--max_expected_errors_reverse', '2.0', '--truncation_quality_score', '2', '--min_overlap', '12', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '0', '--learn_min_reads', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:



Traceback (most recent call last):
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/site-packages/q2cli/commands.py", line 468, in __call__
    results = action(**arguments)
  File "<decorator-gen-72>", line 2, in denoise_paired
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound_callable
    outputs = self._callable_executor_(
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/site-packages/qiime2/sdk/action.py", line 509, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/alexandrosmoscaphd/miniconda3/envs/qiime2-2023.5_n/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 339, 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 will be happy to provide more information if required.

Cheers

Hi @AMosca96, This may be an issue with the resources available for this command. Do you know how much memory is available on this system? Re-running with more memory may address this issue.

As a side note, I see that your truncation parameters are set at 155. Based on the quality plots you shared, I think you could bump this up to 250. These seem to be very high quality reads.

1 Like

Hello @AMosca96,

According to this post, it could also have something to do with requesting too many threads. You could also try to lower the number of threads being requested.

1 Like

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