bwa command not found

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

Introduction

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

bwa: command not found

or when using sudo you get the following error message

sudo: bwa: command not found

Solutions to bwa: command not found

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

In Ubuntu bwa is provided by bwa package.

bwa is:

BWA is a software package for mapping low-divergent sequences against a large reference genome, such as the human genome. It consists of three algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is designed for Illumina sequence reads up to 100bp, while the rest two for longer sequences ranged from 70bp to 1Mbp. BWA-MEM and BWA-SW share similar features such as long-read support and split alignment, but BWA-MEM, which is the latest, is generally recommended for high-quality queries as it is faster and more accurate. BWA-MEM also has better performance than BWA-backtrack for 70-100bp Illumina reads.

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

sudo apt-get -y install bwa

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

You can also use apt command to install bwa.

sudo apt -y install bwa

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

sudo aptitude install bwa

Summary

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