Conda environment

January 2020

see also: → original DADA2 installation page

see also: → Installing QIIME 2 within a conda environment (conda of QIIME2-2019 includes DADA2 version 1.10)

Install DADA2 (v1.14) using a conda environment

1) Install (Mini-)conda

# check if conda exist already

conda info --envs

# conda environments:

#

base * /home/myname/Tools/Miniconda2

qiime2-2019.10 /home/myname/Tools/Miniconda2/envs/qiime2-2019.10

# If command "conda" does not exist

conda info --envs

conda: command not found

# Install miniconda

wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh

bash Miniconda2-latest-Linux-x86_64.sh # run installation

http://conda.pydata.org/miniconda.html

# add conda channels

conda config --add channels defaults

conda config --add channels bioconda

conda config --add channels conda-forge

# check order of conda channels

conda config --get channels

--add channels 'defaults' # lowest priority

--add channels 'bioconda'

--add channels 'conda-forge' # highest priority

2) Setup a new conda environment for DADA2

To avoid → error "Segmentation fault", several conda channels are added to solve multithreading problems

conda create -n dada2-v1.14 -c conda-forge -c bioconda -c defaults --override-channels bioconductor-dada2

Proceed ([y]/n)? y

# check location of new environment

conda info --envs

# conda environments:

#

base * /home/myname/Tools/Miniconda2

dada2-v1.14 /srv/unn/Tools/Miniconda2/envs/dada2-v1.14

qiime2-2019.10 /home/myname/Tools/Miniconda2/envs/qiime2-2019.10

3) Install DADA2

# start the new conda environment for DADA2

conda activate dada2-v1.14

# start R within the conda environment

R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"

# In R: install DADA2 (see also: https://benjjneb.github.io/dada2/dada-installation.html )

if (!requireNamespace("BiocManager", quietly = TRUE))

install.packages("BiocManager")

BiocManager::install("dada2", version = "3.10")

Old packages

Update all/some/none? [a/s/n]: a

# close conda environment

conda deactivate

4) Run DADA2

# start DADA2 conda environment

conda activate dada2-v1.14

# start R

(dada2-v1.14) username@laptop:~$ R

# start DADA2

> library(dada2); packageVersion("dada2")

Loading required package: Rcpp

[1] ‘1.14.0’

See more at the DADA2 tutorial

https://benjjneb.github.io/dada2/tutorial.html

# close R

> q()

Save workspace image? [y/n/c]: n

# close conda environment

conda deactivate