Plugin error from dada2 in R

Hi,
I have faced such kind of problem after the denoising step:
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-ohmqdhzv.log

The command I use was:
qiime dada2 denoise-single \

--i-demultiplexed-seqs paired-end-demux.qza
--p-trim-left 0
--p-trunc-len 248
--o-representative-sequences rep-seqs-dada2.qza
--o-table table-dada2.qza
--o-denoising-stats stats-dada2.qza

The detailed error was:
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-10c1gi27 /tmp/tmponmavjt7/output.tsv.biom /tmp/tmponmavjt7/track.tsv /tmp/tmponmavjt7 248 0 2.0 2 Inf independent consensus 1.0 1 1000000 NULL 16

R version 4.0.2 (2020-06-22)
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.6 / RcppParallel: 5.0.2

  1. Filtering ......................................................................................................
  2. Learning Error Rates

I have no idea how to encounter this problem. I am very much appreciated it if anyone could guide me.

Hello! Welcome to the forum!
You are passing

paired data to

Dada2 plugin for single end data.
Here is the link to Dada2 paired plugin

1 Like

Hi@timanix!

Thank you for your answer.

However, after I changed my code to

qiime dada2 denoise-paired \

--i-demultiplexed-seqs paired-end-demux.qza
--p-trim-left-f 0
--p-trunc-len-f 248
--p-trunc-len-r 248
--o-representative-sequences rep-seqs-dada2.qza
--o-table table-dada2.qza
--o-denoising-stats stats-dada2.qza

The same problem still exists.
Command: run_dada_paired.R /tmp/tmpotlnvtne/forward /tmp/tmpotlnvtne/reverse /tmp/tmpotlnvtne/output.tsv.biom /tmp/tmpotlnvtne/track.tsv /tmp/tmpotlnvtne/filt_f /tmp/tmpotlnvtne/filt_r 248 248 0 0 2.0 2.0 2 independent consensus 1.0 1 1000000

R version 4.0.2 (2020-06-22)
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.6 / RcppParallel: 5.0.2

  1. Filtering ......................................................................................................
  2. Learning Error Rates

Thank you!

Hi @Yuki - we need the entire error output in order to help - there appears to be quite a bit missing right after "2. Learning Error Rates"

Please re-run with the --verbose flag and copy and paste everything here. Thanks!

:qiime2:

Hi!

Thank you for your message.

If I re-run the code:

qiime dada2 denoise-paired \

--i-demultiplexed-seqs paired-end-demux.qza
--p-trim-left-f 0
--p-trunc-len-f 247
--p-trunc-len-r 248
--o-representative-sequences rep-seqs-dada2.qza
--o-table table-dada2.qza
--o-denoising-stats stats-dada2.qza
--verbose

The error message is:
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/tmpy3sel6wj/forward /tmp/tmpy3sel6wj/reverse /tmp/tmpy3sel6wj/output.tsv.biom /tmp/tmpy3sel6wj/track.tsv /tmp/tmpy3sel6wj/filt_f /tmp/tmpy3sel6wj/filt_r 247 248 0 0 2.0 2.0 2 independent consensus 1.0 1 1000000

R version 4.0.2 (2020-06-22)
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.6 / RcppParallel: 5.0.2

  1. Filtering
    ......................................................................................................
  2. Learning Error Rates
    200758142 total bases in 812786 reads from 102 samples will be used for learning the error rates.
    Error: cannot allocate vector of size 95.4 Mb
    Execution halted
    Warning message:
    system call failed: Cannot allocate memory
    Traceback (most recent call last):
    File "/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 264, in denoise_paired
    run_commands([cmd])
    File "/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
    File "/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpy3sel6wj/forward', '/tmp/tmpy3sel6wj/reverse', '/tmp/tmpy3sel6wj/output.tsv.biom', '/tmp/tmpy3sel6wj/track.tsv', '/tmp/tmpy3sel6wj/filt_f', '/tmp/tmpy3sel6wj/filt_r', '247', '248', '0', '0', '2.0', '2.0', '2', 'independent', '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/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py", line 329, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
output_types, provenance)
File "/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in callable_executor
output_views = self._callable(**view_args)
File "/home/qiime2/miniconda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 279, 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.

If possible, could you please give me some suggestions?
Actually I have 100 samples, but if I run several or about 25 samples for test, this code goes very well; if I run 100 samples, it will have error (the details are above). I first thought this might be lack of computer memory of my computer, but I tried run this code through my university's cluster, it still have bugs.

Thank you.

Hi there @Yuki, I'm so sorry for the slow reply.

That thought is right, please check these lines of the error message:

My next suggestion is to run on your institutional cluster, but you mentioned you did that already and it didn't work - can you please provide us with the command you ran and the error you observed? Please note, we can't really help you unless we have those details, otherwise there are a million different things that could be implicated. Thanks!

:qiime2:

1 Like

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