Error occur during DADA2 for single end sequences

Hello,

I got error while running DADA2 for single end sequences.

qiime dada2 denoise-single
--i-demultiplexed-seqs demux.qza
--p-trim-left 0
--p-trunc-len 51
--o-representative-sequences rep-seqs-dada2.qza
--o-table table-dada2.qza
--o-denoising-stats stats-dada2.qza
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 /tmp/qiime2-q2cli-err-5a84gdpv.log

$ qiime dada2 denoise-single
--i-demultiplexed-seqs demux.qza
--p-trim-left 0
--p-trunc-len 51
--o-representative-sequences rep-seqs-dada2.qza
--o-table table-dada2.qza
--o-denoising-stats stats-dada2.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_single.R /tmp/q2-SingleLanePerSampleSingleEndFastqDirFmt-f90v26v7 /tmp/tmppovmei3l/output.tsv.biom /tmp/tmppovmei3l/track.tsv /tmp/tmppovmei3l 51 0 2.0 2 Inf independent consensus 1.0 1 1000000 NULL 16

R version 4.0.5 (2021-03-31) 
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.7 / RcppParallel: 5.1.4 
1) Filtering .
2) Learning Error Rates
1147581753 total bases in 22501603 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 "/home/kmchrf/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 182, in _denoise_single
    run_commands([cmd])
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.11/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_single.R', '/tmp/q2-SingleLanePerSampleSingleEndFastqDirFmt-f90v26v7', '/tmp/tmppovmei3l/output.tsv.biom', '/tmp/tmppovmei3l/track.tsv', '/tmp/tmppovmei3l', '51', '0', '2.0', '2', 'Inf', 'independent', 'consensus', '1.0', '1', '1000000', 'NULL', '16']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

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

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.

Kindly help me to rectify this error.

Hi @Chemomicrobiomics_La,

Thanks for reaching out, and welcome to the :qiime2: forum!

These error logs are very helpful - here is the segment of the log that stands out to me:

The error rates could not be calculated due to the number of reads remaining from your command inputs (your de-multiplexed sequences and the associated p-trim and p-trunc parameters you included).

Without seeing your demux.qza file directly, my guess here is that your --p-trunc-len value is eliminating the majority of your reads. What I'd recommend doing before re-running DADA2 is to run the following command:

qiime demux summarize \
  --i-data demux.qza \
  --o-visualization demux.qzv

This will provide you with a visual summary of your de-multiplexed sequences that you can view on QIIME 2 View.

After uploading your demux.qzv file to QIIME 2 View, you can select the 'Interactive Quality Plot' tab to examine your reads and their associated quality scores. This is a helpful tool for determining reasonable trim/trunc values for your data - maintaining a high enough average quality score without removing too much of your data.

After doing this examination, you should have a better idea of your trim/trunc values - after which you can run DADA2 once more with those adjusted values.

Hope this helps!

Cheers :lizard:

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