Skip to the content.

Shell for Bioinformatics

Learning Objectives

Installations

Access to a High Performance Computer server is through logging in to the server via ssh using a utility application called “Terminal” for performing tasks on the command line (shell). Using a "Terminal" is different for the Mac OS and Windows OS.

Mac users: No installation requirements.
Windows users: will use MobaXterm", a comprehensive remote computing tool designed for Windows.

Details on installing and using MobaXterm is on the next page Introduction to Shell

Instructions for SAIAB students and researchers with access to the SAIAB lab417 cluster

To run through the code in the lessons below, you will need to be logged into lab417 and working on a compute node (i.e. your command prompt should have the word SLURM in it).

  • Log in using ssh username@lab417.saiab.ac.za and enter your password. Alternatively use the following: ssh username@172.20.142.126 and enter your password.
  • Once you are on the login node, use
    $ srun --cpus-per-task=1 -t 0-2:30 --mem 100M --pty /bin/bash to get on a compute node or as specified in the lesson.
  • Proceed only once your command prompt has the word SLURM in it. For example:
  • [SLURM] (base) evilliers@lab417:~$

  • If you log out between lessons (using the exit command twice), please follow points 1. and 2. above to log back in and get on a compute node when you restart with the self learning.
  • Lessons

    Day I

    1. Introduction to Shell (30 min)
    2. Wildcards and shortcuts in Shell (30 min)
    3. Examining and creating files (30 min)
    4. Searching and redirection (60 min)
    5. Shell scripts and variables in Shell (60 min)

    Day II

    1. Loops and automation (60 min)
    2. Permissions and Environment Variables (40 min)
    3. Introduction to High-performance computing (30 min)
    4. Job scheduling on High-performance compute servers using SLURM on the SAIAB server. (60 min)
    5. For users wishing to use the CHPC server, the PBS job scheduling system and modules are used. More details are found in the CHPC specific lesson.

    Resources

    Cheat sheets:

    Online tutorials:

    This lesson has been modified from a course developed by members of the teaching team at the Harvard Chan Bioinformatics Core (HBC). These are open access materials distributed under the terms of the Creative Commons Attribution license (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.