2 Environment Management System
2.1 Install conda
Conda is a package manager obtained via Miniconda or Anaconda.
- For a complete installation guide, click here.
- For documentation, click here.
- Miniconda: https://docs.conda.io/en/latest/miniconda.html
- Anaconda: https://docs.anaconda.com/
- Getting started with Conda: Click here.
2.2 Install mamba
Mamba is a CLI tool to manage conda environments
2.3 Setting up common channels
We will be using lots of bioinformatics and analysis tools.
- Note that most bioinformatics tools are via the
bioconda
channel.- Most analysis tools are installed via the
conda-forge
channel.- Some metagenomics analysis tools described in this guide are installed via the
biobakery
channel.
2.4 Creating a conda environment
2.5 Activating and deactivating the environment
- After setting up the channels and creating an environment, we can install more software.
- For installation, we will use
Mamba package manager
instead ofConda package manager
because it is much faster.
2.8 Reproducing existing environment
Requires an environment spec
file or a yml
file
2.8.3 Updating existing environment
To update the packages in the existing environment e.g. named my_environment, you can run:
2.8.5 Creating new env from a YAML file
- First, create the YAML or YML file:
environment.yml
environment.yaml
- Here, we save the environment.yml file in the
workflow/envs
folder, and it is configured to contain the following:
name: imap
channels:
- conda-forge
- bioconda
- defaults
- r
dependencies:
- snakemake =7.19.1
- snakemake-minimal =7.19.1
- snakemake-wrapper-utils =0.5.0
- snakedeploy =0.8.6
- python =3.8.0
- r-base =4.1.3
- r-tidyverse =1.3.2
- r-bookdown =0.32
- r-htmltools =0.5.4
- r-htmlwidgets =1.6.1
- r-leaflet =2.1.1
- r-leaflet.providers =1.9.0
- r-rmarkdown =2.20
- r-schtools =0.4.0
- graphviz =6.0.1
- qiime2 =2023.2.0
- mothur =1.48.0
- vsearch =2.22.1
- q2-vsearch =2023.2.0
2.9 Checking available environments
If everything goes smoothly, you should see the newly created environment. It will be ready to be activated. Great!