Error while running DADA2 (return code 1) in linux

Hi,
I’m getting the following error when I try to run the DADA2 denoising step (qiime 2018.4) with a small 16S dataset (2x150) on ubuntu 16.04.

"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-89jqjumm.log"

Commands:

qiime tools import
–type ‘SampleData[PairedEndSequencesWithQuality]’
–input-path u01-manifest
–output-path u01-demux.qza
–source-format PairedEndFastqManifestPhred33

qiime dada2 denoise-paired
–i-demultiplexed-seqs u01-demux.qza
–p-trunc-len-f 150
–p-trunc-len-r 149
–p-trim-left-f 0
–p-trim-left-r 0
–output-dir u01-denoise-dada2

Debug log:

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 /tmp/tmpz8rk9v01/forward /tmp/tmpz8rk9v01/reverse /tmp/tmpz8rk9v01/output.tsv.biom /tmp/tmpz8rk9v01/track.tsv /tmp/tmpz8rk9v01/filt_f /tmp/tmpz8rk9v01/filt_r 150 149 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 - 14397 reads in 5342 unique sequences.
    Sample 2 - 14438 reads in 4676 unique sequences.
    Sample 3 - 14476 reads in 5887 unique sequences.
    Sample 4 - 14647 reads in 6065 unique sequences.
    selfConsist step 2
    selfConsist step 3
    selfConsist step 4
    selfConsist step 5
    selfConsist step 6
    selfConsist step 7
    selfConsist step 8
    selfConsist step 9
    selfConsist step 10
    Self-consistency loop terminated before convergence.
    2b) Reverse Reads
    Initializing error rates to maximum possible estimate.
    Error rates could not be estimated.
    Error in err[c(1, 6, 11, 16), ] <- 1 :
    incorrect number of subscripts on matrix
    Calls: dada
    Execution halted
    Traceback (most recent call last):
    File “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 229, in denoise_paired
    run_commands([cmd])
    File “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
    subprocess.run(cmd, check=True)
    File “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/subprocess.py”, line 398, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpz8rk9v01/forward’, ‘/tmp/tmpz8rk9v01/reverse’, ‘/tmp/tmpz8rk9v01/output.tsv.biom’, ‘/tmp/tmpz8rk9v01/track.tsv’, ‘/tmp/tmpz8rk9v01/filt_f’, ‘/tmp/tmpz8rk9v01/filt_r’, ‘150’, ‘149’, ‘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 “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in denoise_paired
File “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 366, in callable_executor
output_views = self._callable(**view_args)
File “/home/usuario/anaconda2/envs/qiime2.4/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 244, 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’ve followed the same steps before using other datasets without problems
any help is welcome

thanks in advance

results from count_seqs.py in qiime1.9:

20195 : ssr_59439__R2__L001.fastq (Sequence lengths (mean +/- std): 149.6067 +/- 5.1120)
20195 : ssr_59439__R1__L001.fastq (Sequence lengths (mean +/- std): 150.4391 +/- 5.2154)
20263 : ssr_59439__R2__L002.fastq (Sequence lengths (mean +/- std): 149.5798 +/- 5.3765)
20263 : ssr_59439__R1__L002.fastq (Sequence lengths (mean +/- std): 150.4361 +/- 5.2839)
20358 : ssr_59439__R2__L003.fastq (Sequence lengths (mean +/- std): 149.5929 +/- 5.2139)
20358 : ssr_59439__R1__L003.fastq (Sequence lengths (mean +/- std): 150.4473 +/- 5.1335)
20825 : ssr_59439__R2__L004.fastq (Sequence lengths (mean +/- std): 149.6036 +/- 5.1277)
20825 : ssr_59439__R1__L004.fastq (Sequence lengths (mean +/- std): 150.4470 +/- 5.0013)

manifest
sample-id,absolute-filepath,direction
1,ssr_59439__R1__L001.fastq.gz,forward
2,ssr_59439__R1__L002.fastq.gz,forward
3,ssr_59439__R1__L003.fastq.gz,forward
4,ssr_59439__R1__L004.fastq.gz,forward
1,ssr_59439__R2__L001.fastq.gz,reverse
2,ssr_59439__R2__L002.fastq.gz,reverse
3,ssr_59439__R2__L003.fastq.gz,reverse
4,ssr_59439__R2__L004.fastq.gz,reverse

Hi there @ju4n_dc! This looks pretty similar to this post. Please take a look at that and let us know if the virtual machine situation applies to you. Thanks! :t_rex: :qiime2:

“This usually indicates that DADA2 ran out of memory while processing. It looks like you might be using the VirtualBox image (based on the filepaths in your traceback; can you please confirm though). You should might be able to increase to allocated memory to the virtual machine.”

Thanks for your response. I’m running qiime2 (2018.4) within a conda enviroment on ubuntu 16.04, just as described here.

I am not very familiar with how to increase the allocated memory to each conda env.
Is there a post where this is explained?

Thanks again!

Your conda environment should already have access to all of your system's memory. Since this is the case, the only other option I can think of is to run this on a machine with more RAM resources. Sorry, wish I had a better answer for you. :qiime2:

It’s weird because I already ran a lot of other larger datasets using dada2 on this computer without a problem (its a i7 with 16 Gb RAM). I guess the problem is something in this particular dataset. The idea was to compare the levels of classification achieved (L6 or L7) with 150 vs. 250 bp reads. I’m gonna try to run it with the R1 reads only.

1 Like

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