DADA2 error (return code -1)

Hi,
I am new to qiime. I tried to use the dada2 to do quality control and join my demultiplexed paired end reads. I used the following command:
qiime dada2 denoise-paired --i-demultiplexed-seqs demux.qza --o-table table-dada2 --o-representative-sequences rep-seqs --p-trim-left-f 0 --p-trim-left-r 0 --p-trunc-len-f 230 --p-trunc-len-r 185
The error message said:
Plugin error from dada2:

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

The log said:
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_paired.R /var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/forward /var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/reverse /var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/output.tsv.biom /var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/filt_f /var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/filt_r 230 185 0 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
    2a) Forward Reads
    Initializing error rates to maximum possible estimate.
    Sample 1 - 1274 reads in 842 unique sequences.
    selfConsist step 2
    selfConsist step 3
    Convergence after 3 rounds.
    2b) Reverse Reads
    Initializing error rates to maximum possible estimate.
    Sample 1 - 1274 reads in 882 unique sequences.
    selfConsist step 2
    selfConsist step 3
    selfConsist step 4
    Convergence after 4 rounds.

  3. Denoise remaining samples

  4. Remove chimeras (method = consensus)
    Error in isBimeraDenovoTable(unqs[[i]], …, verbose = verbose) :
    Input must be a valid sequence table.
    Calls: removeBimeraDenovo -> isBimeraDenovoTable
    In addition: Warning message:
    In is.na(colnames(unqs[[i]])) :
    is.na() applied to non-(list or vector) of type 'NULL’
    Execution halted
    Traceback (most recent call last):
    File “/Users/conghui/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 179, in denoise_paired
    run_commands([cmd])
    File “/Users/conghui/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 35, in run_commands
    subprocess.run(cmd, check=True)
    File “/Users/conghui/miniconda3/envs/qiime2-2017.12/lib/python3.5/subprocess.py”, line 398, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/forward’, ‘/var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/reverse’, ‘/var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/output.tsv.biom’, ‘/var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/filt_f’, ‘/var/folders/fc/933s4yv56ng11zxlz1l55q580000gn/T/tmp_n3m20yh/filt_r’, ‘230’, ‘185’, ‘0’, ‘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 “/Users/conghui/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2cli/commands.py”, line 224, in call
results = action(**arguments)
File “”, line 2, in denoise_paired
File “/Users/conghui/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 228, in bound_callable
output_types, provenance)
File “/Users/conghui/miniconda3/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 “/Users/conghui/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 194, in denoise_paired
" 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.

I am using qiime 2017.12. I just wonder how to fix it? Thanks.

Hi @chuang!

We usually see this error when there was an overlap-related issue when joining your paired-end reads. The ability for reads to be joined successfully is dependent on a handful of factors, including read quality, truncation settings, and adapter removal, to name a few. Have you made sure your sequencing adapters are removed? If so, what does your demux summarize quality plot look like? Please attach here (or a screenshot), this will help us understand why you picked the truncation settings that you provided above. Thanks! :t_rex:

Hi @thermokarst ! Thanks for the reply.
Here is the screenshot of the demux.gzv.


I tried this commands and there are no joined reads passed the quality check.

qiime dada2 denoise-paired --i-demultiplexed-seqs demux.qza --o-table table-dada2 --o-representative-sequences rep-seqs --p-trim-left-f 0 --p-trim-left-r 0 --p-trunc-len-f 250 --p-trunc-len-r 250

I am using the demultiplexed reads from the biotech center and they removed the adapters and primers. The primers we used were expected to generate about 475 bps. The overlap region is not as much as the one in the tutorial. Thanks!

Hi @chuang! It looks like your reverse reads start to drop below ~35 at around bp 130-150. As I mentioned above, read quality also plays a strong role in the read joining — what if you truncate at 140 and see what happens then? Then, explore larger and smaller truncation positions.

qiime dada2 denoise-paired \
  --i-demultiplexed-seqs demux.qza \
  --o-table table-dada2 \
  --o-representative-sequences rep-seqs \
  --p-trim-left-f 0 \
  --p-trim-left-r 0 \
  --p-trunc-len-f 250 \
  --p-trunc-len-r 140

Another option is to ignore your reverse reads entirely — you can process this same demux.qza artifact without reimporting using qiime dada2 denoise-single — that method will look at only the forward reads.

Let us know how it goes and what you discover! :t_rex:

Hi @thermokarst, I tried to use just the forward reads and it worked! I just wonder how will it affect the accuracy of the data analysis and consistency if I compare this results (only 250 bp from forward reads) to other samples with better quality (can be joined using [quote=“thermokarst, post:7, topic:2878”]
qiime dada2 denoise-paired
[/quote])? Thanks a lot.

Hi @chuang,

It depends on the length of those reads. If you are using V4, for example (which is around 290 nt in length total on average), 250 will give you a similar degree of resolution. But much longer reads or different marker gene sites may give better resolution.

Importantly, you will not be able to directly compare results (e.g., merge multiple datasets of different read length into a feature table containing the same features) unless if you trim those other reads to the exact same read length… otherwise the features will be slightly different and contain different feature IDs. You have a few options to compare:

  1. collapse on taxonomy and compare taxonomic composition
  2. use q2-fragment-insertion to compare different marker genes/read lengths.
  3. trim all reads to the same length prior to merging and downstream analysis.

See this thread for more discussion of those options. If you have follow-up questions on performing these comparisons, please open up a new forum post to make that question easier for other users to find. Thanks!

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