DADA2 plugin error (return code 1)

Hi there,

New to Qiime. I just did a conda installation on Mac with OS 11.6.1. Tried to run DADA2 as follows, with the error below (screen shot):

qiime dada2 denoise-paired
--i-demultiplexed-seqs SI2021.qza
--p-trunc-len-f 275
--p-trunc-len-r 270
--p-min-overlap 50
--p-trunc-q 20
--o-table 18S_table.qza
--o-representative-sequences 18Srep-seqs.qza
--o-denoising-stats 18Sdenoising-stats.qza
--verbose

Previously the error was that package Rcpp was missing, so I went and installed it. But I still cannot get DADA2 denoising to work.

Advice appreciated.
-Sheryl

Hi @smurdock - something is wrong with your computation environment - QIIME 2 comes with all the dependencies you need. If you observed an error about a missing dependency, that is usually a symptom of an issue with your computation environment "mixing" different tool environments. Can you please run the following and copy-and-paste the results here:

env

Thanks!

AS=x86_64-apple-darwin13.4.0-as
LDFLAGS=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib -L/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib
AR=x86_64-apple-darwin13.4.0-ar
RSTUDIO_WHICH_R=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/R
ac_cv_func_malloc_0_nonnull=yes
JAVA_LD_LIBRARY_PATH=/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib/server
TERM_PROGRAM=Apple_Terminal
ac_cv_func_realloc_0_nonnull=yes
OBJC=x86_64-apple-darwin13.4.0-clang
HOST=x86_64-apple-darwin13.4.0
SHELL=/bin/bash
TERM=xterm-256color
NM=x86_64-apple-darwin13.4.0-nm
PYTHONNOUSERSITE=/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib/python*/site-packages/
CPPFLAGS=-D_FORTIFY_SOURCE=2 -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
TMPDIR=/var/folders/px/kfbkjd1115gcr19gff5qc1400000gn/T/
PAGESTUFF=x86_64-apple-darwin13.4.0-pagestuff
CONDA_SHLVL=2
LIPO=x86_64-apple-darwin13.4.0-lipo
CONDA_PROMPT_MODIFIER=(qiime2-2021.11)
TERM_PROGRAM_VERSION=440
SIZE=x86_64-apple-darwin13.4.0-size
NMEDIT=x86_64-apple-darwin13.4.0-nmedit
SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
OLDPWD=/Users/sheryl/Desktop
TERM_SESSION_ID=74190A55-FF10-4F03-8A63-F5034992C197
CXX_FOR_BUILD=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-clang++
INSTALL_NAME_TOOL=x86_64-apple-darwin13.4.0-install_name_tool
SEGEDIT=x86_64-apple-darwin13.4.0-segedit
GFORTRAN=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-gfortran
SEG_HACK=x86_64-apple-darwin13.4.0-seg_hack
USER=sheryl
DAStool=/Users/sheryl/programs/DAS_Tool-master/DAS_Tool
R=/Library/Frameworks/R.framework/Versions/Current/Resources/bin
CLANGXX=x86_64-apple-darwin13.4.0-clang++
LIBTOOL=x86_64-apple-darwin13.4.0-libtool
CONDA_TOOLCHAIN_BUILD=x86_64-apple-darwin13.4.0
FC_FOR_BUILD=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-gfortran
CONDA_EXE=/Users/sheryl/miniconda3/bin/conda
OTOOL=x86_64-apple-darwin13.4.0-otool
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.XuI0jOBKIu/Listeners
DEBUG_FORTRANFLAGS=-march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments
CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
STRINGS=x86_64-apple-darwin13.4.0-strings
CONDA_TOOLCHAIN_HOST=x86_64-apple-darwin13.4.0
_CE_CONDA=
CHECKSYMS=x86_64-apple-darwin13.4.0-checksyms
CONDA_PREFIX_1=/Users/sheryl/miniconda3
PATH=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin:/Users/sheryl/miniconda3/condabin:/System/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Python/2.7/site-packages/pip-19.2.3-py2.7.egg/pip:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/sheryl/Megahit/bin:/Users/sheryl/programs/ncbi-blast-2.9.0+/bin:/Users/sheryl/programs/idba-1.1.3/bin:/Users/sheryl/programs/DAS_Tool-master/DAS_Tool:/Users/sheryl/programs:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
MESON_ARGS=--buildtype release
LaunchInstanceID=0C497636-AC76-4DAE-AF8E-2CC52488DB1C
DEBUG_CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -Og -g -Wall -Wextra -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
BUILD=x86_64-apple-darwin13.4.0
LD=x86_64-apple-darwin13.4.0-ld
CONDA_PREFIX=/Users/sheryl/miniconda3/envs/qiime2-2021.11
__CFBundleIdentifier=com.apple.Terminal
F90=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-gfortran
PWD=/Users/sheryl/Desktop/SI2021_Euk_seqs
JAVA_HOME=/Users/sheryl/miniconda3/envs/qiime2-2021.11
STRIP=x86_64-apple-darwin13.4.0-strip
CMAKE_ARGS=-DCMAKE_AR=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_CXX_COMPILER_AR=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_C_COMPILER_AR=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_RANLIB=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_C_COMPILER_RANLIB=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_LINKER=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-ld -DCMAKE_STRIP=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-strip -DCMAKE_INSTALL_NAME_TOOL=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-install_name_tool -DCMAKE_LIBTOOL=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-libtool -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
MPLBACKEND=Agg
F95=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-gfortran
LANG=en_CA.UTF-8
DEBUG_FFLAGS=-march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments
XPC_FLAGS=0x0
F77=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-gfortran
REDO_PREBINDING=x86_64-apple-darwin13.4.0-redo_prebinding
CXX=x86_64-apple-darwin13.4.0-clang++
CC_FOR_BUILD=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-clang
CLANG=x86_64-apple-darwin13.4.0-clang
_CE_M=
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/sheryl
FORTRANFLAGS=-march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
PROGRAMS=/Users/sheryl/programs
CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
_CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_apple_darwin13_4_0
FC=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-gfortran
CONDA_PYTHON_EXE=/Users/sheryl/miniconda3/bin/python
LOGNAME=sheryl
build_alias=x86_64-apple-darwin13.4.0
JAVA_HOME_CONDA_BACKUP=
CONDA_DEFAULT_ENV=qiime2-2021.11
DEBUG_CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -Og -g -Wall -Wextra -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
RANLIB=x86_64-apple-darwin13.4.0-ranlib
CMAKE_PREFIX_PATH=:/Users/sheryl/miniconda3/envs/qiime2-2021.11
CC=x86_64-apple-darwin13.4.0-clang
SEG_ADDR_TABLE=x86_64-apple-darwin13.4.0-seg_addr_table
DISPLAY=/private/tmp/com.apple.launchd.lDaOZBM8I3/org.macosforge.xquartz:0
host_alias=x86_64-apple-darwin13.4.0
JAVA_LD_LIBRARY_PATH_BACKUP=
LDFLAGS_LD=-pie -headerpad_max_install_names -dead_strip_dylibs -rpath /Users/sheryl/miniconda3/envs/qiime2-2021.11/lib -L/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib
R_LIBS_USER=/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib/R/library/
SECURITYSESSIONID=186ab
OBJC_FOR_BUILD=/Users/sheryl/miniconda3/envs/qiime2-2021.11/bin/x86_64-apple-darwin13.4.0-clang
FFLAGS=-march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/sheryl/miniconda3/envs/qiime2-2021.11/include
_=/usr/bin/env

Hi @smurdock , sorry for the slow reply here - we taught a QIIME 2 workshop last week, and the time leading up to that was pretty busy!

I'm guessing R Studio is the cause of this problem - we've seen lots of reports in the past of R Studio installations causing issues with conda environments.

I'm also seeing this env var, which seems suspicious to me

This one looks good to me:

Any chance you can briefly uninstall R Studio and test that out?

Uninstalled Rstudio (just placed in trash- maybe not enough?) and tried the same dada2 command. The error is slightly different from before but still return code 1.

Thanks for checking, yeah there is still some cross-talk between different sets of R packages installed on this computer, I think. With your QIIME 2 conda environment activated, can you please run the following commands:

Command 1

cat ~/.Rprofile

Note, you might not have an .Rprofile file, in that case this command will error. This is fine.

Command 2

R -e ".libPaths()"

Indeed, no .Rprofile. Second command returns:

.libPaths()
[1] "/Library/Frameworks/R.framework/Versions/4.0/Resources/library"
[2] "/Users/sheryl/miniconda3/envs/qiime2-2021.11/lib/R/library"

Ah ha, here's the problem!

The libPaths output shows that you have a system install of R that is taking precedence over your QIIME 2 installation of R, which is why the command you're running above is unable to find the R packages it needs.

To be honest, I have no clue how that first path is being set on your machine - there is no evidence of it in your env output, and like you said, you don't have an Rprofile file.

Is this something you've adjusted on this computer previously?

I added it in an .Renviron file recently for something else, although I don't remember what issue it was meant to fix. I'm afraid removing it will cause issues with other applications that use R. Suggestions?

An off-topic reply has been split into a new topic: superclass "Mnumeric" not defined in the environment of the object's class

Please keep replies on-topic in the future.

We've done a lot of work to ensure that the copy of R that ships with QIIME 2 plays well with others, but there isn't much we can do when a different tools have different needs, you know? Maybe you can check in with the developers of the other tool(s) that required you to make this change and see what they have to say about best-practices?

An alternative is to make multiple user accounts on your computer, this is an easy way to partition things.

Yes, there is also the frustration of having to hold on to older versions of R when packages are not kept up to date with newer R releases. Thanks for your help. I will see if multiple user accounts can fix the problem.

2 Likes

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