Dada2 Error: package ‘Rcpp’ was installed by an R version with different internals

Hey all,

I am actually encountering a similar error as Byron. I was trying to go through the moving pictures tutorial as it is. When running the sequence quality control and feature table construction step using DADA2i.e;

(qiime2-2018.8) [email protected]:/researchdata/fhgfs/ltmfai001/qiime2-moving-pictures-tutorial> *qiime dada2 denoise-single *
*> --i-demultiplexed-seqs demux.qza *
*> --p-trim-left 0 *
*> --p-trunc-len 120 *
*> --o-representative-sequences rep-seqs-dada2.qza *
*> --o-table table-dada2.qza *
> --o-denoising-stats stats-dada2.qza

I get the following error;

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-zqpn_aor.log

Looking at the log file, this is what it says;

(qiime2-2018.8) [email protected]:/researchdata/fhgfs/ltmfai001/qiime2-moving-pictures-tutorial> more /tmp/qiime2-q2cli-err-zqpn_aor.log
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-i1rm_rfn/af321e99-b9e1-438e-9d84-2fe096d73fa9/data /tmp/tmphlsuclai/output.tsv.biom /tmp/t
mphlsuclai/track.tsv /tmp/tmphlsuclai 120 0 2.0 2 Inf consensus 1.0 1 1000000 NULL 16

R version 3.4.1 (2017-06-30)
Loading required package: Rcpp
Error: package ‘Rcpp’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Execution halted
Traceback (most recent call last):
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 152, in _denoise_single
run_commands([cmd])
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/subprocess.py”, line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_single.R’, ‘/tmp/qiime2-archive-i1rm_rfn/af321e99-b9e1-438e-9d84-2fe096d73fa9/data’, ’
/tmp/tmphlsuclai/output.tsv.biom’, ‘/tmp/tmphlsuclai/track.tsv’, ‘/tmp/tmphlsuclai’, ‘120’, ‘0’, ‘2.0’, ‘2’, ‘Inf’, ‘consensus’, ‘1.0’, ’
1’, ‘1000000’, ‘NULL’, ‘16’]’ returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in denoise_single
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 362, in callable_executor
output_views = self._callable(**view_args)
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 186, in denoise_single
band_size=‘16’)
File “/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_dada2/_denoise.py”, line 163, in _denoise_single
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

Now when I run this process using deblur, everything works out just fine.

I had the same problem while running with Qiime2-2018.6 version. I thought upgrading to the latest version could solve the problem, but nah!

I am encountered a similar problem when running my sequences. I believe once I solve the problem while running the tutorial everything should work out fine with my data as well, I hope!

Can someone please help!

Thank you

Hey there @Flutomia!

Apparently you have another installation of DADA2 that appears to be leaking into your QIIME 2 env.

Can you run and provide the results of the following:

R -e ".libPaths()"

and

env

Thanks! :qiime2: :t_rex:

Hey @thermokarst
Thanks so much for your prompt response.Ih ave attached the output from 'env' .Please see below output from R -e ".libPaths()".

(qiime2-2018.8) [email protected]:/researchdata/fhgfs/ltmfai001/qiime2> R -e ".libPaths()"

R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

.libPaths()
[1] "/opt/exp_soft/R-3.5.1/lib64"
[2] "/home/ltmfai001/miniconda3/envs/qiime2-2018.8/lib/R/library"
Qiime2_env_command.txt (5.7 KB)

Thanks @Flutomia!

It looks like you have an .Rprofile defined somewhere that is adding

to your PATH.

Check in $HOME/.Rprofile first — do you see an /opt/exp_soft/R-3.5.1/lib64 entry?

Hey @thermokarst
See below;

[email protected]:~> .Rprofile
If ‘.Rprofile’ is not a typo you can run the following command to lookup the package that contains the binary:
command-not-found .Rprofile
-bash: .Rprofile: command not found

it says command not found.

But I have checked the hidden files. There is no .Rprofile.

However, if the R-3.5.1 is the problem, I did install in on my hex account before installing qiime. So do I I have to uninstall it to solve the problem?

This isn’t going to check for the presence of that file, rather, you could do this:

cd $HOME
ls -lah

If you see a .Rprofile file, then you could run less ~/.Rprofile to see what is in the file.

I am not sure what a “hex account” is, but this looks like the same version that you reported above that is leaking through, so yes, this sounds like it might be the offending deployment. You shouldn’t have to uninstall it though, that is what this .Rprofile business is for.

There is no .Rprofile

[email protected]:~> less ~/.Rprofile
/home/ltmfai001/.Rprofile: No such file or directory

Cool, thanks @Flutomia!

I wonder if you have an R_LIBS_USER env var set - can you run the following and paste the results here? Please check for any sensitive information, first:

env

Hello @thermokarst

Thanks for your help with this issue.

Dada2 was able to run successfully after I changed the R version I was using in my terminal to the version that came with QIIME2 and it somehow solved my problem!!

Thank you!

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