How To Install samtools on CentOS 7

In this tutorial we learn how to install samtools on CentOS 7. samtools is Tools for nucleotide sequence alignments in the SAM format

Introduction

In this tutorial we learn how to install samtools on CentOS 7.

What is samtools

SAM (Sequence Alignment/Map) is a flexible generic format for storing nucleotide sequence alignment. SAM Tools provide various utilities for manipulating alignments in the SAM format, including sorting, merging, indexing and generating alignments in a per-position format.

We can use yum or dnf to install samtools on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install samtools.

Install samtools on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install samtools using yum by running the following command:

sudo yum -y install samtools

Install samtools on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install samtools using dnf by running the following command:

sudo dnf -y install samtools

How To Uninstall samtools on CentOS 7

To uninstall only the samtools package we can use the following command:

sudo dnf remove samtools

References

Summary

In this tutorial we learn how to install samtools on CentOS 7 using yum and dnf.