DADA2 error (return code -6)

Hi,
I was doing the moving pictures tutorial and I get an error with DADA2, this is the message: An error was encountered while running DADA2 in R (return code -6), please inspect stdout and stderr to learn more. I´m using mac OS Sierra 10.13.2. Thank you.
This what the log files says:

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 /var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/qiime2-archive-sfmqcj75/e30869f5-e595-454d-8495-bd624cf6bb49/data /var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpz62r6xpg/output.tsv.biom /var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpz62r6xpg 120 0 2.0 2 consensus 1.0 1 1000000

dyld: Library not loaded: @rpath/libncurses.5.dylib
Referenced from: /Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/libreadline.6.2.dylib
Reason: image not found
Traceback (most recent call last):
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 126, in denoise_single
run_commands([cmd])
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 35, in run_commands
subprocess.run(cmd, check=True)
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/subprocess.py”, line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/qiime2-archive-sfmqcj75/e30869f5-e595-454d-8495-bd624cf6bb49/data’, ‘/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpz62r6xpg/output.tsv.biom’, ‘/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpz62r6xpg’, ‘120’, ‘0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘1’, ‘1000000’]’ returned non-zero exit status -6

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2cli/commands.py”, line 224, in call
results = action(**arguments)
File “”, line 2, in denoise_single
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 228, in bound_callable
output_types, provenance)
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 363, in callable_executor
output_views = self._callable(**view_args)
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 137, in denoise_single
" and stderrto learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code -6), please inspect stdout and stderr to learn more.

Hi @hlopez!

Yikes! This makes me think that some wires are getting crossed in the r-department! Do you have an installation of R present that is unrelated to QIIME 2 (e.g. R Studio)? If so, can you check out this thread and let us know if the workaround proposed there helps? Thanks! :t_rex:

Hi @thermokarst

I do have R Studio installed, I checked the thread but I still having the same error. When I run the echo command:
echo “.libPaths(.libPaths()[2])” > ~/.Rprofile
the next line is empty. Thank you for your help.

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 /var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/qiime2-archive-7iqay9fu/e30869f5-e595-454d-8495-bd624cf6bb49/data /var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpy76097nj/output.tsv.biom /var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpy76097nj 120 0 2.0 2 consensus 1.0 1 1000000

dyld: Library not loaded: @rpath/libncurses.5.dylib
Referenced from: /Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/libreadline.6.2.dylib
Reason: image not found
Traceback (most recent call last):
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 126, in denoise_single
run_commands([cmd])
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 35, in run_commands
subprocess.run(cmd, check=True)
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/subprocess.py”, line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/qiime2-archive-7iqay9fu/e30869f5-e595-454d-8495-bd624cf6bb49/data’, ‘/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpy76097nj/output.tsv.biom’, ‘/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/tmpy76097nj’, ‘120’, ‘0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘1’, ‘1000000’]’ returned non-zero exit status -6

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2cli/commands.py”, line 224, in call
results = action(**arguments)
File “”, line 2, in denoise_single
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 228, in bound_callable
output_types, provenance)
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 363, in callable_executor
output_views = self._callable(**view_args)
File “/Users/metagenomics03/anaconda/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 137, in denoise_single
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code -6), please inspect stdout and stderr to learn more.

Plugin error from dada2:

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

See above for debug info.

Hi @hlopez, sorry to hear this isn’t working out. Can you run the following, and provide the full output here?

$ cat ~/.Rprofile

Thanks! :t_rex:

Hi @thermokarst,
This is the output:
.libPaths(.libPaths()[2])
Thanks for your help!

Thanks @hlopez - that is a bummer, I was hoping something was fishy (:fish:) with your .Rprofile, but it all looks good from here. I am at a bit of a loss as to what to do - that .Rprofile fix has worked for these types of problems in the past, but it doesn’t seem to be helping you. We will continue to stew on this problem, but in the meantime, you could try the following things:

  • Create a new user account on your Mac, and install QIIME 2 there — theoretically the R Studio issues shouldn’t be a problem (I know, this is a pain, and might not even be possible, depending on administration requirements).
  • You could check out one of our Virtual Machines.

Stay tuned! :t_rex:

I know this is a bit old, but what is the result of conda list inside the environment? I wonder if there was just a dud-build linking against readline which has been fixed by now.

Hi @thermokarst, I created a new account and everything seems to work fine, thank so much you for your help.

1 Like

Hi @ebolyen, the problem was solved creating another account on my computer, this is the result of conda list in my older account

packages in environment at /Users/metagenomics03/anaconda/envs/qiime2-2017.12:

appnope 0.1.0 py35_0 conda-forge
asn1crypto 0.22.0 py35_0 conda-forge
backports 1.0 py35_1 conda-forge
backports.functools_lru_cache 1.4 py35_1 conda-forge
bioconductor-biobase 2.38.0 r3.4.1_0 bioconda
bioconductor-biocgenerics 0.24.0 r3.4.1_0 bioconda
bioconductor-biocparallel 1.12.0 r3.4.1_0 bioconda
bioconductor-biostrings 2.46.0 r3.4.1_0 bioconda
bioconductor-dada2 1.6.0 r3.4.1_0 bioconda
bioconductor-delayedarray 0.4.1 r3.4.1_0 bioconda
bioconductor-genomeinfodb 1.14.0 r3.4.1_0 bioconda
bioconductor-genomeinfodbdata 1.0.0 r3.4.1_1 bioconda
bioconductor-genomicalignments 1.14.0 r3.4.1_0 bioconda
bioconductor-genomicranges 1.30.0 r3.4.1_0 bioconda
bioconductor-iranges 2.12.0 r3.4.1_0 bioconda
bioconductor-rsamtools 1.30.0 r3.4.1_0 bioconda
bioconductor-s4vectors 0.16.0 r3.4.1_0 bioconda
bioconductor-shortread 1.36.0 r3.4.1_0 bioconda
bioconductor-summarizedexperiment 1.8.0 r3.4.1_0 bioconda
bioconductor-xvector 0.18.0 r3.4.1_0 bioconda
bioconductor-zlibbioc 1.24.0 r3.4.1_0 bioconda
biom-format 2.1.6 py35_8 qiime2
blas 1.1 openblas conda-forge
blast 2.6.0 boost1.64_2 bioconda
bleach 2.0.0 py35_0 conda-forge
bokeh 0.12.13 py35_0 conda-forge
ca-certificates 2017.11.5 0 conda-forge
cachecontrol 0.12.3 py35_0
cairo 1.14.6 4 conda-forge
certifi 2017.11.5 py35_0 conda-forge
cffi 1.11.2 py35_0 conda-forge
chardet 3.0.4 py35_0 conda-forge
clangdev 5.0.0 default_0 conda-forge
click 6.7 py_1 conda-forge
cryptography 2.1.4 py35_0 conda-forge
curl 7.54.1 0 conda-forge
cutadapt 1.15 py35_0 bioconda
cycler 0.10.0 py35_0 conda-forge
cython 0.27.3 py35_0 conda-forge
deblur 1.0.3 py35h7f3a046_0 biocore
decorator 4.1.2 py35_0 conda-forge
emperor 1.0.0beta13 py35_1 conda-forge
entrypoints 0.2.3 py35_1 conda-forge
fastcluster 1.1.24 py35_0 conda-forge
fasttree 2.1.10 0 bioconda
fontconfig 2.12.1 6 conda-forge
freetype 2.7 1 conda-forge
future 0.16.0 py35_0 conda-forge
gettext 0.19.8.1 0 conda-forge
glib 2.51.4 0 conda-forge
gneiss 0.4.2 py35hd262515_6 biocore
graphite2 1.3.10 0 conda-forge
gsl 2.1 2 conda-forge
h5py 2.7.0 np112py35_0 conda-forge
harfbuzz 1.4.3 0 conda-forge
hdf5 1.8.17 11 conda-forge
html5lib 1.0.1 py_0 conda-forge
icu 58.2 0 conda-forge
idna 2.6 py35_1 conda-forge
ijson 2.3 py35_0 qiime2
intel-openmp 2018.0.0 h8158457_8
ipykernel 4.7.0 py35_0 conda-forge
ipython 6.2.1 py35_1 conda-forge
ipython_genutils 0.2.0 py35_0 conda-forge
ipywidgets 7.1.0 py35_0 conda-forge
jedi 0.10.2 py35_0 conda-forge
jinja2 2.10 py35_0 conda-forge
jpeg 9b 2 conda-forge
jsonschema 2.6.0 py35_0 conda-forge
jupyter_client 5.2.1 py35_0 conda-forge
jupyter_core 4.4.0 py_0 conda-forge
krb5 1.14.2 0 conda-forge
libcxx 5.0.0 0 conda-forge
libffi 3.2.1 3 conda-forge
libgcc 4.8.5 hdbeacc1_10
libgfortran 3.0.1 h93005f0_2
libiconv 1.15 0 conda-forge
libpng 1.6.28 1 conda-forge
libsodium 1.0.15 1 conda-forge
libssh2 1.8.0 1 conda-forge
libtiff 4.0.7 0 conda-forge
libxml2 2.9.5 0 conda-forge
llvmdev 5.0.0 default_0 conda-forge
lockfile 0.12.2 py35_0 conda-forge
mafft 7.310 0 bioconda
markupsafe 1.0 py35_0 conda-forge
matplotlib 2.1.1 py35_0 conda-forge
mistune 0.8.3 py_0 conda-forge
mkl 2018.0.1 hfbd8650_4
msgpack-python 0.4.8 py35_0 conda-forge
natsort 5.0.2 py35_0 conda-forge
nbconvert 5.3.1 py_1 conda-forge
nbformat 4.4.0 py35_0 conda-forge
ncurses 5.9 10 conda-forge
nose 1.3.7 py35_2 conda-forge
notebook 5.2.2 py35_1 conda-forge
numpy 1.12.1 py35_blas_openblas_200 [blas_openblas] conda-forge
openblas 0.2.19 2 conda-forge
openjdk 8.0.121 zulu8.20.0.5_0 conda-forge
openssl 1.0.2n 0 conda-forge
pandas 0.22.0 py35_0 conda-forge
pandoc 2.1 0 conda-forge
pandocfilters 1.4.1 py35_0 conda-forge
pango 1.40.4 0 conda-forge
patsy 0.5.0 py35_0 conda-forge
pcre 8.39 0 conda-forge
pexpect 4.3.1 py35_0 conda-forge
pickleshare 0.7.4 py35_0 conda-forge
pigz 2.3.4 0 conda-forge
pip 9.0.1 py35_1 conda-forge
pixman 0.34.0 1 conda-forge
prompt_toolkit 1.0.15 py35_0 conda-forge
psutil 5.4.0 py35_0 conda-forge
ptyprocess 0.5.2 py35_0 conda-forge
pycparser 2.18 py35_0 conda-forge
pygments 2.2.0 py35_0 conda-forge
pyopenssl 17.4.0 py35_0 conda-forge
pyparsing 2.2.0 py35_0 conda-forge
pysocks 1.6.7 py35_0 conda-forge
python 3.5.4 0 conda-forge
python-dateutil 2.6.1 py35_0 conda-forge
pytz 2017.3 py_2 conda-forge
pyyaml 3.12 py35_1 conda-forge
pyzmq 16.0.2 py35_3 conda-forge
q2-alignment 2017.12.0 py35_0 qiime2/label/r2017.12
q2-composition 2017.12.0 py35_0 qiime2/label/r2017.12
q2-cutadapt 2017.12.0 py35_0 qiime2/label/r2017.12
q2-dada2 2017.12.1 py35_0 qiime2/label/r2017.12
q2-deblur 2017.12.0 py35_0 qiime2/label/r2017.12
q2-demux 2017.12.0 py35_0 qiime2/label/r2017.12
q2-diversity 2017.12.0 py35_0 qiime2/label/r2017.12
q2-emperor 2017.12.0 py35_0 qiime2/label/r2017.12
q2-feature-classifier 2017.12.0 py35_0 qiime2/label/r2017.12
q2-feature-table 2017.12.0 py35_0 qiime2/label/r2017.12
q2-gneiss 2017.12.0 py35_0 qiime2/label/r2017.12
q2-longitudinal 2017.12.0 py35_0 qiime2/label/r2017.12
q2-metadata 2017.12.0 py35_0 qiime2/label/r2017.12
q2-phylogeny 2017.12.0 py35_0 qiime2/label/r2017.12
q2-quality-control 2017.12.0 py35_0 qiime2/label/r2017.12
q2-quality-filter 2017.12.0 py35_0 qiime2/label/r2017.12
q2-sample-classifier 2017.12.0 py35_0 qiime2/label/r2017.12
q2-taxa 2017.12.0 py35_0 qiime2/label/r2017.12
q2-types 2017.12.0 py35_0 qiime2/label/r2017.12
q2-vsearch 2017.12.0 py35_0 qiime2/label/r2017.12
q2cli 2017.12.0 py35_0 qiime2/label/r2017.12
q2templates 2017.12.0 py35_0 qiime2/label/r2017.12
qiime2 2017.12.1 py35_0 qiime2/label/r2017.12
r-base 3.4.1 0 conda-forge
r-bh 1.65.0_1 r3.4.1_0 conda-forge
r-bitops 1.0_6 r3.4.1_0 conda-forge
r-colorspace 1.3_2 r3.4.1_0 conda-forge
r-data.table 1.10.4 r3.4.1_0 conda-forge
r-dichromat 2.0_0 r3.4.1_0 conda-forge
r-digest 0.6.12 r3.4.1_0 conda-forge
r-futile.logger 1.4.3 r3.4.1_0 conda-forge
r-futile.options 1.0.0 r3.4.1_0 conda-forge
r-ggplot2 2.2.1 r3.4.1_0 conda-forge
r-gtable 0.2.0 r3.4.1_0 conda-forge
r-hwriter 1.3.2 r3.4.1_0 conda-forge
r-labeling 0.3 r3.4.1_0 conda-forge
r-lambda.r 1.1.9 r3.4.1_0 conda-forge
r-lattice 0.20_34 r3.4.1_0 conda-forge
r-latticeextra 0.6_28 r3.4.1_0 conda-forge
r-lazyeval 0.2.0 r3.4.1_0 conda-forge
r-magrittr 1.5 r3.4.1_0 conda-forge
r-mass 7.3_45 r3.4.1_0 conda-forge
r-matrix 1.2_7.1 r3.4.1_0 conda-forge
r-matrixstats 0.52.2 r3.4.1_0 conda-forge
r-munsell 0.4.3 r3.4.1_0 conda-forge
r-plyr 1.8.4 r3.4.1_0 conda-forge
r-rcolorbrewer 1.1_2 r3.4.1_0 conda-forge
r-rcpp 0.12.13 r3.4.1_0 conda-forge
r-rcppparallel 4.3.20 r3.4.1_0 conda-forge
r-rcurl 1.95_4.8 r3.4.1_0 conda-forge
r-reshape2 1.4.2 r3.4.1_0 conda-forge
r-rlang 0.1.2 r3.4.1_0 conda-forge
r-scales 0.4.1 r3.4.1_0 conda-forge
r-snow 0.4_2 r3.4.1_0 conda-forge
r-stringi 1.1.5 r3.4.1_0 conda-forge
r-stringr 1.2.0 r3.4.1_0 conda-forge
r-tibble 1.3.3 r3.4.1_0 conda-forge
readline 6.2 0 conda-forge
requests 2.18.4 py35_1 conda-forge
scikit-bio 0.5.1 py35_0 qiime2
scikit-learn 0.19.1 py35_blas_openblas_200 [blas_openblas] conda-forge
scipy 0.19.1 py35_blas_openblas_202 [blas_openblas] conda-forge
seaborn 0.8.1 py35_0 conda-forge
setuptools 38.4.0 py35_0 conda-forge
simplegeneric 0.8.1 py35_0 conda-forge
six 1.11.0 py35_1 conda-forge
sortmerna 2.0 1 bioconda
sqlite 3.13.0 1 conda-forge
statsmodels 0.8.0 py35_0 conda-forge
terminado 0.8.1 py35_0 conda-forge
testpath 0.3.1 py35_0 conda-forge
tk 8.5.19 2 conda-forge
tornado 4.5.2 py35_0 conda-forge
traitlets 4.3.2 py35_0 conda-forge
tzlocal 1.3 py35_0 qiime2
unifrac 0.9.2 py35h1806a49_1 biocore
urllib3 1.22 py35_0 conda-forge
vsearch 2.6.0 0 bioconda
wcwidth 0.1.7 py35_0 conda-forge
webencodings 0.5 py35_0 conda-forge
wget 1.18 0
wheel 0.30.0 py35_2 conda-forge
widgetsnbextension 3.1.0 py35_0 conda-forge
xopen 0.3.2 py35_0 bioconda
xz 5.2.3 0 conda-forge
yaml 0.1.7 0 conda-forge
zeromq 4.2.1 1 conda-forge
zlib 1.2.8 3 conda-forge

Thank you for your help.

Thanks @hlopez!

Since creating a new account fixed the issue, there is probably some other kind of interaction between QIIME 2’s R and a system R. It’s kind of anyone’s guess as to how… If the separate account works for you, then we don’t have to keep trouble-shooting, but otherwise, we’re here to help!

If you are interested in figuring this out, what does the command:

env

give you when you are inside the broken QIIME 2 environment?

Hi @ebolyen, this is the result
This is the result
JAVA_LD_LIBRARY_PATH=/Users/metagenomics03/anaconda/envs/qiime2-2017.12/jre/lib/server
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/qx/5jgcq5wj7sz0h2x13l4z_ryc0000gn/T/
CONDA_SHLVL=1
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.GqR1MKjZWc/Render
CONDA_PROMPT_MODIFIER=(qiime2-2017.12)
TERM_PROGRAM_VERSION=400
TERM_SESSION_ID=9C5CBD68-99A7-4234-954E-CB0BF8B2D9B2
USER=metagenomics03
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.nagvVMnbkw/Listeners
PATH=/Users/metagenomics03/anaconda/envs/qiime2-2017.12/bin:/Users/metagenomics03/anaconda/bin:/Users/metagenomics03/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
CONDA_PREFIX=/Users/metagenomics03/anaconda/envs/qiime2-2017.12
PWD=/Users/metagenomics03
JAVA_HOME=/Users/metagenomics03/anaconda/envs/qiime2-2017.12
MPLBACKEND=Agg
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/metagenomics03
CONDA_PYTHON_EXE=/Users/metagenomics03/anaconda/bin/python
LOGNAME=metagenomics03
JAVA_HOME_CONDA_BACKUP=
CONDA_DEFAULT_ENV=qiime2-2017.12
JAVA_LD_LIBRARY_PATH_BACKUP=
_=/usr/bin/env

Hi @hlopez,

I don’t see anything fishy in your environment variables. One last thing, are you able to run the following (in the q2 environment):

R -e ".libPaths()"

What does that say?

Otherwise, I’m wondering if something just went wrong in the conda environment itself. Does running the following help?:

conda env remove -n qiime2-2017.12
conda clean --all
conda update conda

And then reinstalling like normal.

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