DADA2 Return Code -11 Error

Hello all,

I am currently running shotgun metagenomics in Qiime2 and am going through the DADA2 step. I am using Ubuntu on a Windows PC. DADA2 was denoising samples for almost two weeks (50 large samples) until the following message occurred. I’m not quite sure what caused it and can’t find it in the forum anywhere. Thanks in advance for any help.

(qiime2-2019.7) [email protected]:/mnt/c/Users/berlinba/documents/sequencing/qiime_trial$ qiime dada2 denoise-single --i-demultiplexed-seqs AS_qiime.qza --p-trim-left 0 --p-trunc-len 148 --p-n-threads 0 --o-representative-sequences rep-seqs-dada2.qza --o-table table-dada2.qza --o-denoising-stats stats-dada2.qza --verbose

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_single.R /tmp/qiime2-archive-27mmzxl9/534c1dab-31b4-4b97-b720-10e6bd213e5f/data /tmp/tmpfj1kazyu/output.tsv.biom /tmp/tmpfj1kazyu/track.tsv /tmp/tmpfj1kazyu 148 0 2.0 2 Inf consensus 1.0 0 1000000 NULL 16

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 …
  2. Learning Error Rates
    449725676 total bases in 3038687 reads from 1 samples will be used for learning the error rates.
  3. Denoise samples …


    *** caught segfault ***
    address 0x7f7ab5462000, cause ‘invalid permissions’

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“MATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“OMEGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“MIN_FOLD”]], opts[[“MIN_HAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drp, err = err, multithread = multithread, HOMOPOLYMER_GAP_PENALTY = HOMOPOLYMER_GAP_PENALTY, BAND_SIZE = BAND_SIZE, verbose = FALSE)
An irrecoverable exception occurred. R is aborting now …
Traceback (most recent call last):
File “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 154, in _denoise_single
run_commands([cmd])
File “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/tmp/qiime2-archive-27mmzxl9/534c1dab-31b4-4b97-b720-10e6bd213e5f/data’, ‘/tmp/tmpfj1kazyu/output.tsv.biom’, ‘/tmp/tmpfj1kazyu/track.tsv’, ‘/tmp/tmpfj1kazyu’, ‘148’, ‘0’, ‘2.0’, ‘2’, ‘Inf’, ‘consensus’, ‘1.0’, ‘0’, ‘1000000’, ‘NULL’, ‘16’]’ died with <Signals.SIGSEGV: 11>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py”, line 327, in call
results = action(**arguments)
File “</home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-457>”, line 2, in denoise_single
File “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/berlinba/anaconda3/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 “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 189, in denoise_single
band_size=‘16’)
File “/home/berlinba/anaconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 165, in _denoise_single
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code -11), please inspect stdout and stderr to learn more.

Plugin error from dada2:

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

See above for debug info.

Hi @adamb1187,
Welcome to the forum!

Yikes, that is a wild error message indeed. But there are a couple of issues I can see from a quick glance. 1) q2-dada2 is not designed to handle shotgun data, its use here for amplicon data. For shotgun data with qiime2 take a look at the shogun plugin or metaphlan2. This is reason enough to abandon troubleshooting this.
If for some reason this is in fact amplicon data then…
2) You mention that you had 50 samples but DADA2 is only attempting to train its error model based on 1 sample, which to me usually means it can only see 1 sample. Were your sequences not demultiplexed by chance?
I’ve seen similar (though not exactly the same) errors around here, so once we clear up the top 2 points then we can start digging a bit further if need be.

2 Likes

Thank you very much for the reply, that is certainly a good starting point. The biggest issue is certainly the shotgun data, I didn’t realize that wouldn’t work. I can try the shotgun plugin and/or Metaphlan2 and see how it goes, then report back. In the previous step when I generated the .qza file it was 47 independent .fastq files, I’m not sure why it combined them all into one .qza file. When I look at the .qzv file, it shows that one file as 47 independent samples. Is this how it is normally handled for shotgun data?

Also, for either shogun or Metaphlan2, what is used for denoising and filtering the data if DADA2 can’t be used? Human sequences and redundancy will need to be removed still.

Thanks in advance.

Hi @adamb1187,
I think you should check out the original publications for these methods to read more about what’s going on under the hood. These are stand-alone packages that the developers have released as QIIME 2 plugins, so the original publications will contain lots of useful info.

Both of these are “taxonomic binning” methods so they align your reads against reference genomes to determine taxonomic affiliation. Not sure, but I don’t think any type of denoising is done ahead of time, though QC is performed (at least for shogun) by discarding reads that hit human genomes… I can only imagine metaphlan2 does the same.

See these resources:


https://bitbucket.org/biobakery/metaphlan2/src/default/

1 Like