Skip main navigation

Hurry, only 2 days left to get one year of Unlimited learning for £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

A Sample Software Installation – Samtools

bioinformatics software installation

Watch Mark installing Samtools and follow along to install a bioinformatics tool you will also explore more in Week 2.

Samtools is a suite of utilities for interacting with and post-processing short DNA sequence read alignments in the SAM (Sequence Alignment/Map), BAM (Binary Alignment/Map) and CRAM formats.

The tools support complex tasks such as variant calling and alignment viewing as well as data extraction, sorting, index and format conversion.

The installation of Samtools is carried out using a package and environment manager called Conda. This is an open-source and cross-platform written in the Python programming language which allows a user to install other software packages easily without having to install dependencies manually. Conda can also manage projects containing code written in any language and it allows users to switch between package versions and download and install updates from a software repository.

In order to install Samtools, first go to the Conda installation link that I mentioned at the beginning of the screencast website:

https://docs.conda.io/en/latest/miniconda.html to install the Conda installer for your operating system, Mac, Linux or Windows.

Installing Samtools on Ubuntu

Open a terminal and enter the following commands to update and upgrade the installed packages. Press enter after entering each line of code. You can either enter the commands manually, or cut and paste them into the terminal window.

sudo apt update
sudo apt upgrade

Next, download the Miniconda installer script

https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Navigate to Downloads.

cd Downloads

Then run the script.

bash Miniconda3-latest-Linux-x86_64.sh

Tap the spacebar to move down the licence agreement, and to accept the terms by typing yes.
Press enter to confirm the download location.
Then type yes when prompted to initialise Miniconda.
Miniconda is now installed.

Next install htslib to access the command line functionality of Samtools.

conda install -c bioconda htslib

Proceed by typing y.

Finally, install Samtools by entering the command below.

conda install -c bioconda samtools

Again proceed by typing y.

Installing Samtools on Mac

Download the Miniconda installer for macOS from the link below:

https://docs.conda.io/en/latest/miniconda.html

Next install htslib to access the command line functionality of Samtools.

conda install -c bioconda htslib

Proceed by typing y.

Finally, install Samtools by entering the command below.

conda install -c bioconda samtools

again proceed by typing y.

Please follow the instructions in the video and/or the in the text above, showing how to install the Samtools.

We will go back to Samtools at the end of Week 2.

Do leave your comments in the comments section below.

This article is from the free online

Bioinformatics for Biologists: An Introduction to Linux, Bash Scripting, and R

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now