Week 5 content overview and readings

Content overview for this week

This week, we will talk about shell scripting. Last week, we focused on more advanced shell commands that can help to summarize and reformat data – but we issued these commands interactively in the shell, one line at a time. When you need to repeat a certain sequence of commands regularly, or run a program that may take a while, it becomes useful to put your shell commands in a script. Such a script can be easily and quickly (re-)executed, or submitted to a queue on a cluster (next week’s topic!).

Since shell scripts are essentially sequences of shell commands with some added bells and whistles, it is relatively straightforward to start using them with what we have learned so far. That said, we will start by further setting the stage for scripts by talking about loops, conditionals, and variables on Tuesday. On Thursday, we will talk about shell scripts themselves.

Some of the things you will learn this week:

Readings

This week’s reading is Chapter 12 from the Buffalo book.

The latter part of this chapter is about using find, xargs, and Makefiles. These are somewhat tangential to the week’s topic of scripts: in class, I will likely only touch briefly on find.

If you can, do read these sections, but I recommend you focus on the first part of the chapter, especially if run out of time or bandwidth.

As for Makefiles specifically, it will be good to understand the principle behind them. However, there is no need to fully understand the syntax, since we will learn about Snakemake, an alternative approach to workflow management, later in the course.

Required readings

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".