2. Tool installation¶
2.1. Install the conda package manager¶
We will use the package/tool managing system conda to install some programs that we will use during the course. It is not installed by default, thus we need to install it first to be able to use it.
# download latest conda installer curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh # run the installer bash Miniconda3-latest-Linux-x86_64.sh # delete the installer after successful run rm Miniconda3-latest-Linux-x86_64.sh # Install some conda channels # A channel is where conda looks for packages conda config --add channels conda-forge conda config --add channels defaults conda config --add channels r conda config --add channels bioconda
Close shell/terminal, re-open new shell/terminal.
conda update conda
Should the conda installer download fail. Please find links to alternative locations on the Downloads page.
The conda install assumes a bash shell.
Biolinux might default to a zsh shell.
Thus, the conda command might not be available after installation.
A quick solution for the current shell window is to switch to a bash shell by typing
echo 'export PATH="/home/manager/miniconda3/bin:$PATH"' >> ~/.bashrc echo 'export PATH="/home/manager/miniconda3/bin:$PATH"' >> ~/.zshrc
The above assumes that your username is "manager", which is the default on a Biolinux install.
Replace "manager" with your actual username.
Find out with
2.2. Create environment¶
We create a conda environment for some tools This is useful to work reproducible as we can easily re-create the tool-set with the same version numbers later on.
conda create -n ngs python=3 # activate the environment source activate ngs
2.3. Install software¶
To install software into the activated environment, one uses the command
# install more tools into the environment conda install package
To tell if you are in the correct conda environment, look at the command-prompt.
Do you see the name of the environment in round brackets at the very beginning of the prompt, e.g. (ngs)?
If not, activate the
ngs environment with
source activate ngs before installing the tools.
2.4. General conda commands¶
# to search for packages conda search [package] # To update all packages conda update --all --yes # List all packages installed conda list [-n env] # conda list environments conda env list # create new env conda create -n [name] package [package] ... # activate env source activate [name] # deavtivate env source deactivate