Connect with us

Software

Installing SAMtools on Ubuntu

Tariq Abdullah

Published

on

Install SAMtools on Ubuntu

SAMtools is a software package for high-throughput sequencing data analysis [1]. It consists of three separate packages: SAMtools, BCFtools, and HTSlib. We are going to install SAMtools only on Ubuntu. For the installation tutorial of BCFtools, click here.

Preparing system

Open a terminal by pressing Ctrl+Alt+T. Update and upgrade your system using the following commands:

$ sudo apt-get update

$ sudo apt-get upgrade

Installing Pre-requisites

To install SAMtools, you need to install some libraries that are necessary. Paste the following command in the terminal.

$ sudo apt-get install -y libncurses-dev libbz2-dev liblzma-dev

Downloading SAMtools

Change to the directory where you want to download the software. Let’s say, Downloads. Download the latest release of SAMtools from here or use the following command:

$ cd Downloads/

$ wget https://github.com/samtools/samtools/releases/download/1.12/samtools-1.12.tar.bz2

Installing SAMtools

We are in the same directory (i.e., Downloads). Now extract the downloaded package using the following commands.

$ tar xvjf samtools-1.12.tar.bz2

Now, change to the newly created directory (samtools-1.12).

$ cd samtools-1.12/

Install using the following commands.

$ ./configure

$ make

$ sudo make install

Export to the path using the following command:

$ export PATH="$PATH:/home/user/Downloads/samtools-1.12"

Now add it in the bashrc file as shown below.

  • open bashrc file
    $ sudo gedit ~/.bashrc
  • Add the following line at the end of the file:
    $ export PATH="$PATH:/home/user/Downloads/samtools-1.12"
  • Save and exit. After that paste the following command in the terminal:
    $ source ~/.bashrc

Now, SAMtools is successfully installed on your system. You can run it by typing $ samtools.


References

  1. Danecek, P., Bonfield, J. K., Liddle, J., Marshall, J., Ohan, V., Pollard, M. O., … & Li, H. (2020). Twelve years of SAMtools and BCFtools. arXiv preprint arXiv:2012.10295.

Tariq is founder of Bioinformatics Review and CEO at IQL Technologies. His areas of expertise include algorithm design, phylogenetics, MicroArray, Plant Systematics, and genome data analysis. If you have questions, reach out to him via his homepage.

Software

How to install IQ-TREE on Ubuntu (Linux)?

Dr. Muniba Faiza

Published

on

How to install IQ-TREE on Ubuntu (Linux)?

IQ-TREE [1] is a bioinformatics software for phylogenetic/phylogenomic inference. It is available as a webserver and a standalone tool. In this article, we are going to install IQ-TREE on Ubuntu. (more…)

Continue Reading

Software

Installing Snakemake on Ubuntu (Linux)

Tariq Abdullah

Published

on

Installing Snakemake on Ubuntu (Linux)

Snakemake is a workflow management system to create scalable data analyses [1]. Workflows are defined in Python-based language. In this article, we are going to install Snakemake on Ubuntu (Linux). (more…)

Continue Reading

Software

Installing Conda on Ubuntu (Linux)

Dr. Muniba Faiza

Published

on

Installing Conda on Ubuntu (Linux)

Conda (Anaconda, Inc.) is an open-source dependency, package, and environment management system for any language such as Python, R, Javascript, C/C++, and so on. In this article, we are going to install Conda on Ubuntu 18.04 & 20.04. (more…)

Continue Reading

LATEST ISSUE

ADVERT