Error was encountered while running DADA2 with V3-V4 data

I'm new.
I ran DADA2 with V3-V4 data, but got an error.
qiime dada2 denoise-paired
--p-trim-left-f 17 --p-trim-left-r 21
--p-trunc-len-f 265 --p-trunc-len-r 225
--i-demultiplexed-seqs demux-subsample.qza
--o-table table.qza
--o-representative-sequences rep-seqs.qza
--o-denoising-stats stats-dada2.qza
--verbose
--p-n-threads 0

(qiime2-2021.4) kjun@DESKTOP-EO45M8R:/mnt/c/dry_dry/2022_GF_Metagenome$ qiime dada2 denoise-paired \

--i-demultiplex> --i-demultiplexed-seqs demux.qza \

--o-table table.qza \
--o-representative-sequences rep-seqs.qza \
--o-denoising-stats stats-dada2.qza \
--p-trim-left-f 17 \
--p-trim-left-r 21 \
--p-trunc-len-f 280 \
--p-trunc-len-r 220

Plugin error from dada2:

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

Debug info has been saved to /tmp/qiime2-q2cli-err-fj88zlpd.log
(qiime2-2021.4) kjun@DESKTOP-EO45M8R:/mnt/c/dry_dry/2022_GF_Metagenome$ lqiime dada2 denoise-paired
--i-dem> --i-demultiplexed-seqs demux.qza \

--o-table table.qza \
--o-representative-sequences rep-seqs.qza \
--o-denoising-stats stats-dada2.qza \
--p-trim-left-f 17 \
--p-trim-left-r 21 \
--p-trunc-len-f 280 \
--p-trunc-len-r 220 \
--verbose

lqiime: command not found
(qiime2-2021.4) kjun@DESKTOP-EO45M8R:/mnt/c/dry_dry/2022_GF_Metagenome$ qiime dada2 denoise-paired \

--i-demultiplexed-seqs demux.qza \
--o-table table.qza \
--o-representative-sequences rep-seqs.qza \
--o-denoising-stats stats-dada2.qza \
--p-trim-left-f 17 \
--p-trim-left-r 21 \
--p-trunc-len-f 280 \
--p-trunc-len-r 220 \
--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 /tmp/tmpuhozqm_v/forward /tmp/tmpuhozqm_v/reverse /tmp/tmpuhozqm_v/output.tsv.biom /tmp/tmpuhozqm_v/track.tsv /tmp/tmpuhozqm_v/filt_f /tmp/tmpuhozqm_v/filt_r 280 220 17 21 2.0 2.0 2 12 independent consensus 1.0 1 1000000

R version 4.1.1 (2021-08-10)
Loading required package: Rcpp
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/kjun/miniconda3/envs/qiime2-2021.4/lib/R/library/Rcpp/libs/Rcpp.so':
/home/linuxbrew/.linuxbrew/lib/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/kjun/miniconda3/envs/qiime2-2021.4/lib/R/library/Rcpp/libs/Rcpp.so)
Error: package ‘Rcpp’ could not be loaded
Execution halted
Traceback (most recent call last):
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 266, in denoise_paired
run_commands([cmd])
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
subprocess.run(cmd, check=True)
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpuhozqm_v/forward', '/tmp/tmpuhozqm_v/reverse', '/tmp/tmpuhozqm_v/output.tsv.biom', '/tmp/tmpuhozqm_v/track.tsv', '/tmp/tmpuhozqm_v/filt_f', '/tmp/tmpuhozqm_v/filt_r', '280', '220', '17', '21', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '1', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/commands.py", line 329, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/action.py", line 244, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/action.py", line 390, in callable_executor
output_views = self._callable(**view_args)
File "/home/kjun/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, 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.

Plugin error from dada2:

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

See above for debug info.

I found maybe this problem relate with previous question (An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more), however, I couldn't find out how to solve it.

Hello @jundata,

Welcome to the forums! :qiime2:

Thank you for posting all those details. Here's the primary error:

Looks like something is not working with your installation of R.

The easiest way to fix this is probably to install Qiime2 again. This would also be a great time to install the newest version of Qiime2. :sparkles: :qiime2: :sparkles:

Let me know if that solves the problem and you are able to denoise your reads!

@colinbrislawn

I install new Qiime2, however, I got same error.

(qiime2-2021.11) kjun@DESKTOP-EO45M8R:/mnt/c/dry_dry/2022_GF_Metagenome$ qiime dada2 denoise-paired \

--p-trim-left-f 17 --p-trim-left-r 21
--p-trunc-len-f 284 --p-trunc-len-r 227
--i-demultiplexed-seqs demux-subsample.qza
--o-table table.qza
--o-representative-sequences rep-seqs.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_paired.R /tmp/tmp0fj8ucfw/forward /tmp/tmp0fj8ucfw/reverse /tmp/tmp0fj8ucfw/output.tsv.biom /tmp/tmp0fj8ucfw/track.tsv /tmp/tmp0fj8ucfw/filt_f /tmp/tmp0fj8ucfw/filt_r 284 227 17 21 2.0 2.0 2 12 independent consensus 1.0 1 1000000

R version 4.1.1 (2021-08-10)
Loading required package: Rcpp
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/kjun/miniconda3/envs/qiime2-2021.11/lib/R/library/Rcpp/libs/Rcpp.so':
/home/linuxbrew/.linuxbrew/lib/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/kjun/miniconda3/envs/qiime2-2021.11/lib/R/library/Rcpp/libs/Rcpp.so)
Error: package ‘Rcpp’ could not be loaded
Execution halted
Traceback (most recent call last):
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 266, in denoise_paired
run_commands([cmd])
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
subprocess.run(cmd, check=True)
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmp0fj8ucfw/forward', '/tmp/tmp0fj8ucfw/reverse', '/tmp/tmp0fj8ucfw/output.tsv.biom', '/tmp/tmp0fj8ucfw/track.tsv', '/tmp/tmp0fj8ucfw/filt_f', '/tmp/tmp0fj8ucfw/filt_r', '284', '227', '17', '21', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '1', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/home/kjun/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, 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.

Plugin error from dada2:

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

See above for debug info.

Thank you.

Hello @colinbrislawn

Thank you for your helpful information and so fast reply.
I will try it.

Thanks for trying that out!

This may random question, but what linux distro are you using? Ubuntu? WSL? Something else? :penguin:

Here why I ask: I did this google search based on part of the error, and found stuff about homebrew and the build toolchain on linux. I wonder if there is something unique about your linux setup that is causing issues that would not otherwise appear on something 'vanilla' like ubuntu-stable

Thank you reply.

My linux environment is like below.
Ubuntu 20.04.3 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64)

Is it enough information ?

That sounds like the normal Windows Subsystem for Linux to me. I also use WSL and have not see this error.

Well, I'm out of ideas. Has anyone else seen this?

I think we may have found a clue about the problem. (Thanks Matt)

Looks like we might have different environments mixing together here. Can you activate your qiime2 conda environment and the output of these two commands?

env
echo $PATH

Sorry for late.

(base) kjun@DESKTOP-EO45M8R:~$ env
SHELL=/bin/bash
CONDA_EXE=/home/kjun/miniconda3/bin/conda
_CE_M=
WSL_DISTRO_NAME=Ubuntu-20.04
HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew
HOMEBREW_SHELLENV_PREFIX=/home/linuxbrew/.linuxbrew
NAME=DESKTOP-EO45M8R
PWD=/home/kjun
LOGNAME=kjun
CONDA_PREFIX=/home/kjun/miniconda3
MANPATH=/home/linuxbrew/.linuxbrew/share/man:
MOTD_SHOWN=update-motd
HOME=/home/kjun
LANG=C.UTF-8
WSL_INTEROP=/run/WSL/150_interop
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:*.xspf=00;36:
CONDA_PROMPT_MODIFIER=(base)
INFOPATH=/home/linuxbrew/.linuxbrew/share/info:
LESSCLOSE=/usr/bin/lesspipe %s %s
TERM=xterm-256color
_CE_CONDA=
LESSOPEN=| /usr/bin/lesspipe %s
USER=kjun
HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar
CONDA_SHLVL=1
SHLVL=1
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew
CONDA_PYTHON_EXE=/home/kjun/miniconda3/bin/python
CONDA_DEFAULT_ENV=base
WSLENV=
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/kjun/miniconda3/bin:/home/kjun/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2021.825.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/Jun Kambe/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Jun Kambe/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
HOSTTYPE=x86_64
_=/usr/bin/env

(base) kjun@DESKTOP-EO45M8R:~$ echo $PATH
/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/kjun/miniconda3/bin:/home/kjun/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2021.825.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/Jun Kambe/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Jun Kambe/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin

1 Like

I don't have a solution for this yet, but we are wondering if this has to do with using an older (perhaps unsupported) version of Linuxbrew.

Have you tried the new version of Homebrew and does it work better? https://brew.sh/

Why use conda instead miniconda? (I also use homebrew on my 2021 M1 mac, so I think it would be interesting to compare our uses-cases for builds outside of the conda ecosystem. :package: :snake:)

Thank you

I have tried new version of Homebrew.
However, qiime2 still show same error...

I consider my qiime2 environment build on miniconda.
Is it wrong..?

And I have tried to update qiime2 newest version, but same as before.

Based on the logs you posted, it looks like both homebrew and conda are inside your path. I think this overlap is causing issues.

Removing brew from your path, or uninstalling it totally, could be our next debugging step, but I know that's disruptive... Want to try it?

I would like to try next debugging steps, but is it also affect the other software?

Uninstalling homebrew would probably mess up any software you installed and built with homebrew, but all your conda stuff should be unaffected.

Might be worth trying a conda deployment on another machine to make sure it's working for you, before removing stuff from your PC.

Thank you for your advice and sorry for late answering.
I work on my middle term thesis presentation.

I will try your advice, and is the method to uninstall Homebrew from my PC as described in the URL?

Yep, that's the official uninstaller! Once that's uninstalled, we can see if that cleans up the conda install and we can get that working.

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