macs2 command not found

In this troubleshooting guide we learn how to fix macs2 command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

macs2: command not found

or when using sudo you get the following error message

sudo: macs2: command not found

Solutions to macs2: command not found

How To Fix macs2: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu macs2 is provided by macs package.

macs is:

MACS empirically models the length of the sequenced ChIP fragments, which tends to be shorter than sonication or library construction size estimates, and uses it to improve the spatial resolution of predicted binding sites. MACS also uses a dynamic Poisson distribution to effectively capture local biases in the genome sequence, allowing for more sensitive and robust prediction. MACS compares favorably to existing ChIP-Seq peak-finding algorithms, is publicly available open source, and can be used for ChIP-Seq with or without control samples.

To fix this problem, we can install more using the command below.

sudo apt-get -y install macs

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install macs.

sudo apt -y install macs

Or if you have aptitude installed you can use the following command.

sudo aptitude install macs

Summary

In this tutorial we learn how to fix macs2 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.