Skip main navigation

A Sample Software Installation – Samtools

bioinformatics software installation
8.1
In order to instal conda for Mac, go to the conda website and download the installer for Python version 3.8. Click on the link and this will start the download.
23.7
If you’re installing conda for Linux, go to the appropriate section of the same website and download the latest version for Python 3.8. This will start the download. To instal conda, open a terminal and navigate to the place where you downloaded the installer. This method works on Mac or Linux. So for both systems, open a terminal and navigate to the place where you downloaded the installer. As you can see, the installer is initiated by typing bash followed by the installer name. Press enter to run the installer and then press enter again when prompted. Tap the space bar at the end of every page to quickly move through the licence agreement.
75
Type yes to accept the licence terms and pres enter to confirm the location where miniconda will be installed. The packages and dependencies to make miniconda work will now instal. It is quite a quick process. Type yes and press enter. Miniconda is now installed. Use conda to instal the htslib libraries that SamTools will use. Type y and press enter. This will instal all the packages and dependencies for htslib.
116.5
Finally, instal SamTools using conda. Type y and press enter and SamTools is now installed.

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

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education