curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
Installing software
A lot of bioinformatic workflows start with installing software. Since this often means not only installing the software but several dependencies, we recommend the use of a package management system, such as conda or mamba. These tools allow you to find and install packages in their own environment without administrator privileges.
This is especially useful if you require different software versions, such as python3.6 versus python3.10, for different workflows. With package management systems you can easily setup different python versions in different environments.
Installing mamba
A lot of system already come with conda installed, however, if possible we recommend working with mamba instead of conda. mamba is a drop-in replacement and uses the same commands and configuration options as conda, however, it tends to be much faster. A useful thing is that if you find documentation for conda then you can swap almost all commands between conda & mamba.
To install mamba, follow the instructions here. This should look something like this for mac and linux-systems. If you are on windows, the easiest is to setup up Windows Subsystem for Linux (WSL) first and then use the code below.
When running the bash command, you get asked a few questions:
- Read the license and use arrow down to scroll down. Don’t scroll too fast, so that you see the next question
- Decide were conda gets installed. You can say yes, with the default location in your home but don’t forget that for Crunchomics your home only has 25G of space. You could also install the miniforge/mambaforge folder in your personal folder instead.
- Say yes, when you get asked whether conda should be initialized during start up
- Restart the shell (exit the terminal and use ssh to log back in) for the changes to take effect
- Check if conda is accessible by running
conda -h
To setup conda/mamba on Mobaxterm we need to do some extra steps first.
MobaXterm is primarily designed as a terminal application for Windows, providing a Unix-like environment through the use of Cygwin or a Windows Subsystem for Linux (WSL) integration. While it offers many Linux-like features and utilities, there are some differences and limitations compared to a native Linux environment. In order to deal with these limitations, we can install WSL in order to get access to a native Linux environment.
If you want to install and use conda/mamba you need to install WSL first.
- To install WSL, follow these instructions
- Once you have that installed, you can download and install MobaXterm if you have not done that already: https://mobaxterm.mobatek.net
- Inside MobaXterm, you will probably will see that your WSL is already listed on the left panel as an available connection. Just double-click it and you will be accessing it via MobaXterm. If you don’t see it you can also run WSL directly.
- By default this home directory is in a temporary folder that gets deleted every time you exit Mobaxterm, To give this folder a persistent home, do the following:
- Settings –> Configuration –> General
- In General set Persistent home directory to a folder of your choice
- Follow the installation instructions for conda as listed above
Setting up an environment
Let’s assume we want to install a tool, ITSx, into an environment called fungal_genomics. If you only have conda installed that is completely fine, just replace mamba with conda in the code below.
We can do this as follows:
#check if the tool is installed (should return command not found)
ITSx -h
#create an empty environment and name it fungal_genomics
mamba create -n fungal_genomics
#install some software, i.e. itsx, into the fungal_genomics environment
mamba install -n fungal_genomics -c bioconda itsx
#to run the tool activate the environment
conda activate fungal_genomics
#check if tool is installed
ITSx -h
#leave the environment
conda deactivate
A full set of mamba/conda commands can be found here
Adding existing environments
On crunchomics other people might have already installed environments that might be useful for your work. One example is the amplicomics share, which comes with several QIIME 2 installations. To use this, first ask for access to the amplicomics share by contacting n.dombrowski@uva.nl with your uva net id. After you got access, you can add conda environments in the amplicomics share with:
conda config --add envs_dirs /zfs/omics/projects/amplicomics/miniconda3/envs/