Bioinformatics: Setting up your computer (1)

Bioinformatics101

Setting up your computer

By SAJEEWA PEMASINGHE

Explanations (in terms of commands to run on a terminal window) will be given on how to set up an Ubuntu Linux machine. If you are using a Windows machine, you can install Linux as a virtual machine.

The first task would be to update  and upgrade your Linux system.

sudo apt-get update && sudo apt-get upgrade  -y

Now install the required libraries

sudo apt-get install -y curl unzip build-essential ncurses-dev
sudo apt-get install -y byacc zlib1g-dev git cmake
sudo apt-get install -y default-jdk ant

Initializing the terminal configuration can be done by the following commands.

curl http://data.biostarhandbook.com/install/bash_profile.txt >> ~/.bash_profile
curl http://data.biostarhandbook.com/install/bashrc.txt >> ~/.bashrc
source ~/.bash_profile

Next, we install miniconda which is a simplified version of anaconda as follows

curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

During the installation opt ‘yes’ for adding conda to the PATH.

Open a new terminal and type the following to make sure the conda is active.

conda

Now that you have installed conda, you can create an environment called bioinfo with:

conda create -y --name bioinfo python=3

You can activate the bioinfo environment in the following way

source activate bioinfo

The bioinformatics software we are going to install is called Bioconda. It can be enabled using the conda package manager in the following way.

conda config --add channels r
conda config --add channels conda-forge
conda config --add channels bioconda

The set of tools that will be needed for the analyses can be installed using a one-line code

curl http://data.biostarhandbook.com/install/conda.txt | xargs conda install -y

The tools installed above can be upgraded to their latest versions using:

curl http://data.biostarhandbook.com/install/conda.txt | xargs conda upgrade -y

Install R programming package

sudo apt-get install r-base

Open a new terminal window and cd to the directory where you installed miniconda. Then go to envs/bioinfo/bin directory. Now download the doctor.py script to this directory as follows:

wget http://data.biostarhandbook.com/install/doctor.py

Make the doctor.py script executable as follows

chmod +x doctor.py

Now go to the terminal window where you created the virtual environment and run the doctor.py script as below to make sure you have installed all the necessary tools for our bioinformatics journey.

doctor.py

All the commands that we discuss in the following tutorials should be run inside the bioinfo virtual environment. When finished, we can exit the bioinfo environment by the following command.

source deactivate

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.