DADA2 in R (return code -1), error

Hello, I run Dada2 using the following command I got the error. I am a new user so I don't understand what is the cause of error?

$ qiime dada2 denoise-paired --verbose --p-n-threads 4 --p-trim-left-f 17 --p-trim-left-r 21 --p-trunc-len-f 290 --p-trunc-len-r 250 --i-demultiplexed-seqs demux.qza --o-table table.qza --o-representative-sequences rep-seqs.qza --o-denoising-stats stats-dada2.qza

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/tmp4e3k4eaj/forward /tmp/tmp4e3k4eaj/reverse /tmp/tmp4e3k4eaj/output.tsv.biom /tmp/tmp4e3k4eaj/track.tsv /tmp/tmp4e3k4eaj/filt_f /tmp/tmp4e3k4eaj/filt_r 290 250 17 21 2.0 2.0 2 12 independent consensus 1.0 4 1000000

R version 4.1.3 (2022-03-10)
Loading required package: Rcpp
DADA2: 1.22.0 / Rcpp: 1.0.8.3 / RcppParallel: 5.1.5

  1. Filtering Error in names(answer) <- names1 :
    'names' attribute [54] must be the same length as the vector [27]
    Execution halted
    Traceback (most recent call last):
    File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, in denoise_paired
    run_commands([cmd])
    File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
    File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmp4e3k4eaj/forward', '/tmp/tmp4e3k4eaj/reverse', '/tmp/tmp4e3k4eaj/output.tsv.biom', '/tmp/tmp4e3k4eaj/track.tsv', '/tmp/tmp4e3k4eaj/filt_f', '/tmp/tmp4e3k4eaj/filt_r', '290', '250', '17', '21', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '4', '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-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 292, in denoise_paired
raise Exception("An error was encountered while running DADA2"
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

1 Like

Hello @KanjanaChangkaew,

Welcome to the forums! :qiime2:

Based on a quick search, it looks like that's a memory error in disguise :disguised_face:

(How much RAM / memory does your computer have? How big is your input .qza file?)

Try rerunning that with fewer threads let us know how it goes.

Hello @colinbrislawn

My device detail:
Processor Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz 2.11 GHz
Installed RAM 8.00 GB (7.77 GB usable)
Device ID 347D419A-4F6A-4F7D-9B65-1B51AE646EC7
Product ID 00330-53367-68358-AAOEM
System type 64-bit operating system, x64-based processor

The size of demux.qza file is 2.2 GB (2,226,533,714 bytes)

I tried again with reduce the threads 1 and still got the error.

$ qiime dada2 denoise-paired --verbose --p-n-threads 1 --p-trim-left-f 17 --p-trim-left-r 21 --p-trunc-len-f 290 --p-trunc-len-r 250 --i-demultiplexed-seqs demux.qza --o-table table.qza --o-representative-sequences rep-seqs.qza --o-denoising-stats stats-dada2.qza

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/tmpmtocbnvz/forward /tmp/tmpmtocbnvz/reverse /tmp/tmpmtocbnvz/output.tsv.biom /tmp/tmpmtocbnvz/track.tsv /tmp/tmpmtocbnvz/filt_f /tmp/tmpmtocbnvz/filt_r 290 250 17 21 2.0 2.0 2 12 independent consensus 1.0 1 1000000

R version 4.1.3 (2022-03-10)
Loading required package: Rcpp
DADA2: 1.22.0 / Rcpp: 1.0.8.3 / RcppParallel: 5.1.5

  1. Filtering ......................................................
  2. Learning Error Rates
    277190004 total bases in 1015348 reads from 46 samples will be used for learning the error rates.

###!!! [Child][PContentChild] Error: Send(msgname=PNecko::Msg_RemoveRequestContext) Channel closing: too late to send/recv, messages will be lost

###!!! [Child][PContentChild] Error: Send(msgname=PNecko::Msg_RemoveRequestContext) Channel closing: too late to send/recv, messages will be lost

###!!! [Child][PContentChild] Error: Send(msgname=PNecko::Msg_RemoveRequestContext) Channel closing: too late to send/recv, messages will be lost

Sandbox: failed to send broker response to pid 7753: Broken pipe

###!!! [Child][PContentChild] Error: Send(msgname=PNecko::Msg_RemoveRequestContext) Channel closing: too late to send/recv, messages will be lost

Traceback (most recent call last):
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, in denoise_paired
run_commands([cmd])
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
subprocess.run(cmd, check=True)
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpmtocbnvz/forward', '/tmp/tmpmtocbnvz/reverse', '/tmp/tmpmtocbnvz/output.tsv.biom', '/tmp/tmpmtocbnvz/track.tsv', '/tmp/tmpmtocbnvz/filt_f', '/tmp/tmpmtocbnvz/filt_r', '290', '250', '17', '21', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '1', '1000000']' died with <Signals.SIGKILL: 9>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/home/qiime2/miniconda/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 292, in denoise_paired
raise Exception("An error was encountered while running DADA2"
Exception: An error was encountered while running DADA2 in R (return code -9), please inspect stdout and stderr to learn more.

1 Like

Ok! That's a new error:

<Signals.SIGKILL: 9>.

Search the forums for that message and see if those solutions work for you.

This may still be a memory issue. Do you have access to a computer with more than 8 gigs of ram?

1 Like

Finally I got the result by seting the Qiim Virtual to run with 5 gigs and below command.

qiime dada2 denoise-paired --verbose --p-n-threads 1 --p-trim-left-f 17 --p-trim-left-r 21 --p-trunc-len-f 290 --p-trunc-len-r 250 --i-demultiplexed-seqs demux.qza --o-table table.qza --o-representative-sequences rep-seqs.qza --o-denoising-stats stats-dada2.qza

Thank you for your help.

1 Like

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