MORE errors like DADA2 error (Return Code 1)

Hi there,

I have encountered the following error running dada2. Here is my original command and the contents of the log file. Strange to see only one sample being used for estimating error rates as there are 82 samples in the qza file. Error rates could not be estimated seems to be the culprit, error matrix null. Any idea what may be going on here? Is the program stalling out on the first file?

Sample data was imported via a manifest file but was checked to make sure it was imported correctly. Viewing the summary of importing shows 82 samples with 10,000 to 12,000,000 reads each, run on NovaSeq.

COMMAND:

(qiime2-2022.8) mobio@mobios-Mac-Pro raw % qiime dada2 denoise-paired \
  --i-demultiplexed-seqs /Volumes/Accelsior4M2/Emily_CEGA_2022/12S/qiime/12S_samples.qza \
  --p-trunc-len-f 116 \
  --p-trunc-len-r 108 \
  --p-n-threads 0 \
  --o-table /Volumes/Accelsior4M2/Emily_CEGA_2022/12S/qiime/12S_samples_filtered_table.qza \
  --o-representative-sequences /Volumes/Accelsior4M2/Emily_CEGA_2022/12S/qiime/12S_samples_rep_seqs.qza \
  --o-denoising-stats /Volumes/Accelsior4M2/Emily_CEGA_2022/12S/qiime/12S_samples_denoising_stats.qza

ERROR MESSAGE:

Plugin error from dada2:

  An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

Debug info has been saved to /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/qiime2-q2cli-err-k4gofbvc.log


LOG FILE:
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 /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/forward --input_directory_reverse /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/reverse --output_path /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/output.tsv.biom --output_track /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/track.tsv --filtered_directory /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/filt_f --filtered_directory_reverse /var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/filt_r --truncation_length 116 --truncation_length_reverse 108 --trim_left 0 --trim_left_reverse 0 --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.1.3 (2022-03-10) 
Loading required package: Rcpp
DADA2: 1.22.0 / Rcpp: 1.0.9 / RcppParallel: 5.1.5 
2) Filtering ........................................................................
3) Learning Error Rates
281961200 total bases in 2430700 reads from 1 samples will be used for learning the error rates.
262515600 total bases in 2430700 reads from 1 samples will be used for learning the error rates.
Error rates could not be estimated (this is usually because of very few reads).
Error in getErrors(err, enforce = TRUE) : Error matrix is NULL.
Execution halted
Traceback (most recent call last):
  File "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 308, in denoise_paired
    run_commands([cmd])
  File "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/forward', '--input_directory_reverse', '/var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/reverse', '--output_path', '/var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/output.tsv.biom', '--output_track', '/var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/track.tsv', '--filtered_directory', '/var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/filt_f', '--filtered_directory_reverse', '/var/folders/ct/s1pv_mxs0kd8s0m574z7ds980000gn/T/tmpht0r8905/filt_r', '--truncation_length', '116', '--truncation_length_reverse', '108', '--trim_left', '0', '--trim_left_reverse', '0', '--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 "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-292>", line 2, in denoise_paired
  File "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/qiime2/sdk/action.py", line 234, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/qiime2/sdk/action.py", line 381, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/Users/mobio/opt/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 321, 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.

THANKS!!!

Hi @kmw,

Thanks for providing these details!

I can't say for certain without looking at the interactive quality plot for your data, but my suspicion is that your truncation lengths are filtering out all but one of your samples. Can you share either your demux.qzv or a screenshot of your interactive quality plot? This will give us a better idea of the quality of your sequences, and where a good place to truncate would be, based on your quality scores.

If things look reasonable there, this may have something to do with the fact that your data is from NovaSeq, which always has binned quality scores (which can cause issues with DADA2 generating error rates).

Cheers :lizard:

1 Like

Hi Liz,

Thanks so much for responding. I have used these truncation lengths for the same data processed on a MiSeq with no issues. I have attached a screenshot of the interactive quality plot which looks good so I think the truncation length is good. I read elsewhere that it may be a memory problem so I am running a subset of samples on half of my threads to see if I get the same error message. If I can't get rid of the error then it may not be possible to run DADA2 with NovaSeq data?

Thanks!

Hi @kmw,

Apologies for the delay in response on this!

These interactive quality plots are helpful - it looks like your quality scores remain in the same bin for essentially the entire read length, so I don't see a need for those truncation lengths (you would only want to truncate that aggressively if you had a drop in quality score at those lengths). I'd recommend trying again without truncating and see if that's successful.

Cheers :lizard:

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