Biyoinformatik

HOW TO INSTALL CONDA

Conda is a package repository. It contains most of the useful scientific tools. Also, it has an abiltity to create environments. This document contains the necessary information to install conda.

This document consists of the following titles:

  1. How to install conda
  2. How to create enviroments
  3. Conda channels
  4. How to install Bioconductor package?

1. How to install conda

First please install conda:

For Linux;

wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh 

For Mac;

curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > Miniconda3-latest-MacOSX-x86_64.sh

bash Miniconda3-latest-MacOSX-x86_64.sh

2. How to create enviroments?

A conda environment is a directory that contains a specific collection of conda packages that is installed.

To create an environment, use the following command. Please note that there will be no packages installed in this environment.

conda create --name nameoftheenvironment

If you wish to create an environment with a specific version of Python:

conda create -n nameoftheenvironment python=3.8

To create an environment with a specific package:

conda create -n nameoftheenvironment package

After creating the environment you can activate it with

conda activate nameoftheenvironment 

To deactivate the environment

conda deactivate

3. Conda channels

Conda channels are the locations where packages are stored. Different channels can have the same package, so to avoid collisions conda prefers packages from a higher priority channel over any version from a lower priority channel. To make a channel highest priority use the following command:

conda config --add channels <new_channel>

To see whether or not the new channel is added, we can check the top three channels in conda configuration:

conda config --show | grep -A 3 "^channels:"

4. How to install Bioconductor package?

Bioconda is a channel for the conda package manager specializing in bioinformatics software.

To install Bioconductor first we need to make sure the channels are set appropriately. As stated in the ‘Conda Channels’ part, we can use the following command to add lease follow the the channel “bioconda” to the top of the channel list:

conda config --add channels bioconda

Then we should create an enviroment, the same way stated in ‘How to create enviroments?’:

conda create --name nameoftheenvironment

conda activate nameoftheenvironment 

Then we need to install required bioconductor packages:

conda install bioconductor-biocparallel

To start an R session as installed by Bioconda,

~/miniconda3/envs/nameoftheenvironment/bin/R

OLD PARTS;

Install mamba. This is the tool that we are going to use to download packages:

conda install -n base -c conda-forge mamba

Our first tool. The most important one. Snakemake:

mamba -c bioconda -c conda-forge snakemake-minimal