By Yan Li

PhD in Bioinformatics, University of Liverpool

How do we install softwares in Linux?

  • Compile from source code
  • Download the binary file
  • Use a package manager
    • from the system: apt-get (Debian, Ubuntu), yum (CentOS, Red Hat), pacman (Arch, Manjaro), homebrew (Macos)

    • from a programming language: pip (Python), cran (R)

    • Universal package manager: conda

  • Use a container: docker, singularity

Virtual environment

# conda environments:
base                     /home/yan/anaconda3
ai                       /home/yan/anaconda3/envs/ai
bioinfo                  /home/yan/anaconda3/envs/bioinfo
course                *  /home/yan/anaconda3/envs/course

Put conflicting packages in seperate environments

Manage packages

# packages in environment at /home/yan/anaconda3/envs/course:
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    conda-forge
blast                     2.9.0                h20b68b9_1    bioconda
boost                     1.68.0          py37h8619c78_1001    conda-forge
boost-cpp                 1.68.0            h11c811c_1000    conda-forge

Manage dependencies automatically

Basic commands

# environment
conda create -n env-name
conda env list
conda activate env-name
conda deactivate

# package
conda install package-name
conda remove package-name
conda list

Find a package

Go to anaconda website and search

Demonstration & Workshop