10.1 Prepare your shell environment

If the comment chunks of the code (text after #) is creating you problems, use the following code to disable interactive comments and avoid issues when copy-pasting code:

setopt interactivecomments

Required software

Bioinformatic pipelines for processing omic data require the use of dozens of software. All the required software are listed in the conda environment installation file available here.

Install conda / miniconda

Conda is an open-source package management system and environment management system that quickly installs, runs, and updates packages and their dependencies. If conda is not installed in your system, the first step is to install miniconda (a free minimal installer for conda, enough to run the bioinformatic analyses explained in the workbook). Miniconda installers for Linux, Mac and Windows operating systems can be found in the following website: https://docs.conda.io/en/latest/miniconda.html

Once conda or miniconda is installed in your system, you should be able to create and manage your conda environments. You can test whether conda has been succesfully installed using the following code:

conda -V
#> conda 22.11.1 #or whatever version you have installed

Install mamba (optional)

An optional step is to install mamba, which is a reimplementation of the conda package manager in C++, which speeds up many of the processes. Mamba can be installed through the command line using the conda install option.

conda install mamba -n base -c conda-forge

Create a conda environment

All the bioinformatic analyses explained in this workbook will be run within an environment containing all the necessary software. The file that specifies which software to install in the environment is available here, and can be retrieved using wget (as shown in the code below), or downloading from the Internet browser. If using the latter option, don’t forget to provide the absolute path to the ‘holo-omics-env.yaml’ file in the mamba create command.

wget https://raw.githubusercontent.com/holo-omics/holo-omics.github.io/main/bin/holo-omics-env.yaml #download installer file
conda update conda #to ensure everything is updated
conda deactivate #deactivate any conda environment before creating a new one
conda env create -f holo-omics-env.yml
rm holo-omics-env.yaml #remove installer file

As the environment contains dozens of softwares, the process of creating it will take a while. It is recommended to have a good Internet connection to speed-up software download. Once the installation is over, you can double-check whether the environment has been successfully created using the following script:

conda activate holo-omics
#> (holo-omics) anttonalberdi@Anttons-MBP ~ %

The (holo-omics) specifies the environment you are at. To get out of the environment use:

conda env list
#> base                  *  /Users/anttonalberdi/miniconda3
#> holo-omics               /Users/anttonalberdi/miniconda3/envs/holo-omics

Activate the holo-omics conda environment

Whenever running the holo-omic analyses explained in this workbook, it will be necessary to activate the holo-omics environment through the following command:

conda activate holo-omics
#> (holo-omics) anttonalberdi@Anttons-MBP ~ %

Install software in conda environment

Once the environment is activated, you can install the required software using the Conda package manager. For example, to install metawrap, run the following command:

conda activate holo-omics
conda install -y -c ursky metawrap-mg=1.2.2