# Conda
Conda (opens new window) is a handy environment management system that allows you to reliably install packages and libraries and quickly switch between package versions. We recommend to use faster Micromamba (opens new window) distribution.
Conda for HUNT Workbench
This guide is for the installation of Conda directly on your lab machines. Head over to our Reproducibility FAQ in the HUNT Workbench section to learn more about Conda in your workbench environment.
# 1. Install Conda
1.1 Log into your lab machine and install Miniconda:
echo | "${SHELL}" <(curl -L https://micro.mamba.pm/install.sh);
~/.local/bin/micromamba install -n base -c conda-forge -y "conda" "mamba"
See Installing on Linux (opens new window) for more information on the Micromamba (opens new window) installation.
1.2 After the installation, log out and log into your lab to activate your Conda setup.
exit
Get more out of Conda
To get most out of Conda we recommend reading the guide Conda - Managing environments (opens new window).
# 2. Set up Bioconda and Conda-forge channels
To find packages in Conda you need to configure relevant channels.
We recommend to start with bioconda (opens new window) and conda-forge (opens new window) channels.
2.1 A quick way to make sure your channels are added correctly is to (re)add them in this order:
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
Read more on how to set up channels (opens new window) in the guide from Bioconda.
# 3. Install your tools
Search for your favorite tool on the Bioconda page (opens new window) and have a field day installing:
# -- Working example
mamba install plink2
# -- or
conda install plink2
TIP
We have a very easy guide on how to get Saige running in Conda.
# 4. Do cool science
Start your favorite tools and do cool science:
plink2 <input>
# Additional resources
- Install R with conda (opens new window)
- Update to the latest R version (opens new window)
- List of available R-packages (opens new window)
Note that this work with some, but not all, bioconductor-packages. Please send us a note if you need these.
# install
mamba create -n renv -c conda-forge r-base r-essentials
# or
conda create -n renv -c conda-forge r-base r-essentials
conda activate renv
# install package in shell
R CMD INSTALL --library="${CONDA_PREFIX}/lib/R/library" .
# install cran packages within r
install.packages("png", paste(Sys.getenv("CONDA_PREFIX"), "/lib/R/library", sep=""))