Problem with DAD2 (return code 1)

I was running the qiime dada denoise step and i got the following results. Any suggestions?

qiime dada2 denoise-single --i-demultiplexed-seqs demux-single-end.qza --p-trim-left 0 --p-trunc-len 120 --o-representative-sequences rep-seqs-dada2.qza --o-table table-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/qiime2-archive-fr5l9mbg/dc805a9d-f91c-4716-9a22-41a0a993244f/data /tmp/tmp8jxujjse/output.tsv.biom /tmp/tmp8jxujjse 120 0 2.0 2 consensus 1.0 1 1000000

R version 3.4.1 (2017-06-30)
Loading required package: Rcpp
DADA2 R package version: 1.6.0

  1. Filtering …
  2. Learning Error Rates
    Error in dada(drps[1:i], err = NULL, selfConsist = TRUE, multithread = multithread, :
    derep$quals matrix has an invalid maximum Phred Quality Scores of 93
    Execution halted
    Traceback (most recent call last):
    File “/home/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 126, in denoise_single
    run_commands([cmd])
    File “/home/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 35, in run_commands
    subprocess.run(cmd, check=True)
    File “/home/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/subprocess.py”, line 398, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/tmp/qiime2-archive-fr5l9mbg/dc805a9d-f91c-4716-9a22-41a0a993244f/data’, ‘/tmp/tmp8jxujjse/output.tsv.biom’, ‘/tmp/tmp8jxujjse’, ‘120’, ‘0’, ‘2.0’, ‘2’, ‘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/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/site-packages/q2cli/commands.py”, line 224, in call
results = action(**arguments)
File “”, line 2, in denoise_single
File “/home/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 228, in bound_callable
output_types, provenance)
File “/home/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 363, in callable_executor
output_views = self._callable(**view_args)
File “/home/sblanch/Documents/Nathan_Ricks/miniconda2/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 137, in denoise_single
" and stderr to learn more." % e.returncode)
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.

Good evening,

Here is the important line of the error:
derep$quals matrix has an invalid maximum Phred Quality Scores of 93

There is a problem with your quality scores! In order to really have a Phred score of 93, a base pair would have to be 99.99999995 % accurate, which is clearly impossible.

Is there any way your Phred Quality Scores in your fastq file could have been changed? What preprocessing steps did you perform before dada2?

Let us know what you find,
Colin

2 Likes

In addition to @colinbrislawn’s suggestions: Are your quality scores encoded as Phred 64? We usually see Phred 33 these days, but older data can sometimes be Phred 64, in which case you’d want to import the data using the Phred 64 fastq manifest format. If you use that format, QIIME 2 will convert the quality scores from Phred 64 to Phred 33 during import.

1 Like

So I am running some samples using Pacbio amplicon sequencing. Due to its method of generatinga consensus sequence from many sequences, my quality scores are extremely high.
Thus becomes an issue when I attempt to run DAD2. It presents the following error
Error in dada(drps[1:i], err = NULL, selfConsist = TRUE, multithread = multithread, :
derep$quals matrix has an invalid maximum Phred Quality Scores of 93

I thought I could get around this by just giving all of my sequences a generic quality score, however, then I got the following error:
Error in err[c(1, 6, 11, 16), ] <- 1 :
incorrect number of subscripts on matrix
Which according to another post (Doing taxonomy analysis and getting abundancies with manifests) was due to have fake quality scores.
How would you suggest going about fixing this?

Hi @nricks,
It sounds like you are interested in using dada2 to dereplicate your sequences, rather than to denoise as it is intended (the use of fake quality scores implies this to me — which would render dada2 meaningless even if it did not result in errors). I would recommend using q2-vsearch to dereplicate (and possibly cluster) sequences. I am unfamiliar with analysis of PacBio data, but I would recommend the approach described in that tutorial link rather than dada2. QIIME2 does not currently contain any methods explicitly designed for quality filtering PacBio data. Would this address your need?

As far as I know, the error profiling method in dada2 is not tuned for PacBio data so I would not advise using dada2 (though I may be wrong. @benjjneb would know better about the suitability of pacbio data for dada2).

Is that the case, or do pacbio data use a different PHRED encoding? PHRED 93 may be off the scale expected for dada2 (Illumina 1.8+ Phred+33 does not go up to 93 as far as I know).

:fearful:
This would be highly unadvisable for inputting to any method that actually uses quality scores, let alone one for denoising (dada2). If you arbitrarily set quality scores for each read, what do you hope to accomplish with dada2?

I hope that helps!

1 Like

Mostly I was hoping to use dad2 for removing the chimeric sequences

Thanks for clarifying!

Instead, you can use q2-vsearch to chimera filter directly.

:sparkles::cake::sparkles:

Also, I’m trying to get my files into the FeatureData[Sequence] artifact format, and the dada2 and deblur functions were the way the moving pictures tutorial was able to produce them

Check out the dereplication/OTU picking tutorial that I linked to above. These steps will produce a feature table.

It sounds like we may need to link to this OTU picking tutorial in the moving pictures tutorial — that will happen once it migrates into the main QIIME2 docs from the community tutorials section of the forum. Thanks for bringing this up!

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