Exit code -11 from DADA2

I’m getting an error with exit code -11 from when trying to run denoise-paired from DADA2. I tried reinstalling Rcpp and my R version 3.3.1, but no luck. Thanks.


qiime dada2 denoise-paired --i-demultiplexed-seqs lulu_raw.qza --p-trunc-len-f 210 --p-trunc-len-r 180 --output-dir dada2_output --p-n-threads 10 --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_paired.R /var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/forward /var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/reverse /var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/output.tsv.biom /var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/filt_f /var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/filt_r 210 180 0 0 2.0 2 consensus 1.0 10 1000000

R version 3.3.1 (2016-06-21) 
Loading required package: Rcpp

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: dyn.load(file, DLLpath = DLLpath, ...)
 2: library.dynam(lib, package, package.lib)
 3: loadNamespace(package, lib.loc)
 4: doTryCatch(return(expr), name, parentenv, handler)
 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6: tryCatchList(expr, classes, parentenv, handlers)
 7: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
 8: try({    attr(package, "LibPath") <- which.lib.loc    ns <- loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, deps)})
 9: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,     quietly = quietly)
10: .getRequiredPackages2(pkgInfo, quietly = quietly)
11: library(dada2)
An irrecoverable exception occurred. R is aborting now ...
Traceback (most recent call last):
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 179, in denoise_paired
    run_commands([cmd])
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 35, in run_commands
    subprocess.run(cmd, check=True)
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/forward', '/var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/reverse', '/var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/output.tsv.biom', '/var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/filt_f', '/var/folders/1d/p1nml9712yn2pmv5hv77q9m05pr6pk/T/tmplkigq6d2/filt_r', '210', '180', '0', '0', '2.0', '2', 'consensus', '1.0', '10', '1000000']' returned non-zero exit status -11

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/site-packages/q2cli/commands.py", line 222, in __call__
    results = action(**arguments)
  File "<decorator-gen-132>", line 2, in denoise_paired
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 201, in callable_wrapper
    output_types, provenance)
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 334, in _callable_executor_
    output_views = callable(**view_args)
  File "/Users/qmuncaster/miniconda3/envs/qiime2-2017.8/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 194, in denoise_paired
    " 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.

Hey @quintinm,

I think you ran into an issue with using R conda environments and having R/R-Studio installed at the same time. Assuming you have R Studio and DADA2 already installed normally (outside of QIIME 2), we have a kind of gross work-around.

Does adding an .Rprofile file in your home directory like described in this issue fix the problem? You’ll need to add/remove (or comment out) that line depending on if you are using QIIME 2 or R Studio, but it’s the best workaround we have at the moment.

If you don’t have R outside of QIIME 2, then there must be something else going wrong, did you use the correct install command for OS X? If you install the linux version by mistake, things can look like they are working until something very odd like this happens.

Let me know if any of that helps!

1 Like

Yes, that worked. Thank you!

An off-topic reply has been split into a new topic: Dada2 exit code -11 and .RProfile

Please keep replies on-topic in the future.

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