Plugin error from dada2: error encountered while running DADA2 in R (return code 1)

Hello everyone,
I am trying to get results with DADA2 using the following command:
qiime dada2 denoise-paired \

–i-demultiplexed-seqs demux-paired-end.qza
–p-trim-left-f 10
–p-trim-left-r 10
–p-trunc-len-f 0
–p-trunc-len-r 0
–p-trunc-q 25
–o-table 25_table.qza
–o-representative-sequences 25_rep-seqs.qza
–o-denoising-stats 25_denoising-stats.qza

I have also tried changed the values of trimming and truncation ,and I added > --p-n-threads 12 , and value of 20 too, but I am get the same error all the time:
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/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/qiime2-q2cli-err-h7kw6iqr.log

When I open the log I get:

Command: run_dada_paired.R /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/forward /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/reverse /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/output.tsv.biom /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/track.tsv /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r 232 232 10 10 2.0 2.0 25 consensus 1.0 1 1000000

R version 3.5.1 (2018-07-02)
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: 1.0.2 / RcppParallel: 4.4.3

  1. Filtering The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/28_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/28_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/34_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/34_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/35_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/35_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/36_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/36_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/42_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/42_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/43_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/43_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/45_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/45_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/50_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/50_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/55_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/55_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/56_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/56_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/58_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/58_S1_L001_R2_001.fastq.gz not written.
    The filter removed all reads: /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f/59_S1_L001_R1_001.fastq.gz and /var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r/59_S1_L001_R2_001.fastq.gz not written.
    Some input samples had no reads pass the filter.
    .x…xxx…xx.x…xxx.xx…
  2. Learning Error Rates
    22200 total bases in 100 reads from 23 samples will be used for learning the error rates.
    Error in err[c(1, 6, 11, 16), ] <- 1 :
    número de subscritos incorretos en matriz
    Ejecución interrumpida
    Traceback (most recent call last):
    File “/Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 234, in denoise_paired
    run_commands([cmd])
    File “/Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
    subprocess.run(cmd, check=True)
    File “/Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/subprocess.py”, line 418, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/forward’, ‘/var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/reverse’, ‘/var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/output.tsv.biom’, ‘/var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/track.tsv’, ‘/var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_f’, ‘/var/folders/t6/rcnzmjhd70g53z6wk2td9nph0000gn/T/tmp98qmmi36/filt_r’, ‘232’, ‘232’, ‘10’, ‘10’, ‘2.0’, ‘2.0’, ‘25’, ‘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/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py”, line 327, in call
results = action(**arguments)
File “</Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-459>”, line 2, in denoise_paired
File “/Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/Users/alfonso/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 249, 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 though there might be issues with memory space, but I friend of mine tried the same in her computer and she gets the same error.
Does someone know what could be happening here?
Thank you so much in advance!

Hi @Lucia,
Welcome on the forum!
I think the key information in the log is:
‘Some input samples had no reads pass the filter.’

Lets have a look on the setting you used:
–p-trunc-len-f 0
–p-trunc-len-r 0
–p-trunc-q 25

So, you asking dada2 to keep any reads for which the quality score is at least 25 until its end. The error is saying that there is one (or more) sample(s) with no reads meeting this requirement. (At least this is my interpretation …).
My suggest would be to lower the expected quality value, and/or setting a different trimming length, but to better help you, would be helpful if you could upload the qzv object, so we could look at the quality profile of your reads.
If you do not wish to made the data public, feel free to private-message me!

Hope it helps

1 Like

Also, this error occurs when you oversubscribe your machine with too high of a --p-n-threads value - how many CPUs/cores are available to you?

1 Like

Hello Luca,
Thank you so much for your help! I did lower the quality value to 23, and it worked. :slight_smile:

1 Like