Getting Started with BASh

Image from Unsplash: A woman teaching her female colleague something on a laptop

Written by Wale Ogunleye | Edited by: Chidimma Nwaku

BASh (Bourne-Again Shell) is a widely used command-line interface for interacting with Unix-based systems such as Linux OS and macOS.

Unlike computers that come with a graphical interface, unix systems have a command line interface that provides programmatic access to powerful bioinformatics tools, and improved computing power.

With the increasing data scale and need for automation, BASh is one powerful, yet handy tool that makes life easy for bioinformaticians.

Command Line Interface (Left) | Graphical User Interface (Right)

First, let’s talk about the two kinds of computing interfaces:

  • Graphical User Interface: A (GUI) is a digital interface in which a user interacts with graphical components such as icons, buttons, and menus. In a GUI, the visuals displayed in the user interface convey information relevant to the user, as well as actions that they can take. The sad thing is that it is usually restricted to what has been pre-designed for the user to use and have access to. 
  • Command Line Interface: A CLI is a text-based interface in which a user interacts with program, files, and computing power with command parsed in the form of text. These commands are usually based on a shell or scripting language such as BASh. The sad thing is that they are uninteresting interfaces. But on the bright side, you have:
    • Granular control over the operating system, applications/software, and processors
    • The ability to manage multiple tasks at the same time efficiently
    • Ability to automate several regular/repetitive tasks

Here are 5 steps you need to take to get started in using BASh for your bioinformatics analysis and automation:

  1. To get started with BASh, you need a command line interface (or Terminal). You can spin up one with Google’s cloud shell. Watch this video to learn how to spin one Bash based terminal.
  2. Familiarize yourself with the BASh syntax: There are many online tutorials for learning BASh. The Carpentry provides a cool tutorial here. For a guided set of learning tutorials, enroll to learn BASh for free with HackBio here.
  3. Install and use bioinformatics tools: Bash is often used to run bioinformatics tools and pipelines. Many bioinformatics tools can be installed via package managers like apt, conda, or pip. Once installed, these tools can be run via the command-line using various parameters and options.
  4. Learn to use pipelines: Bash is often used to build pipelines, which are sequences of commands that are used to process and analyze data. In bioinformatics, pipelines are often used to process large amounts of data, such as next-generation sequencing data. There are many pre-built pipelines available for various bioinformatics tasks, or you can create your own pipeline using Bash scripting.
  5. Practice: Like with any new skill, the best way to learn is to practice. Start with small tasks and gradually work your way up to more complex tasks. As you gain more experience, you will become more comfortable with Bash and be able to use it more effectively in your bioinformatics work.

Everything you need to learn about BASh as a bioinformatician has been organized into a free course for you by HackBio here

You can also test your BASh skills here to quickly assess your competencies. If you are confused about where to start learning bioinformatics, talk to one of our mentors here.

Leave a Comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s