Skip to content

Script Style Guide

aspides-js edited this page Sep 28, 2022 · 8 revisions

Coding style

Comments are preceded by 1 #. Where scripts are organised into sections, section headers are all CAPITALS Four '####' indicate the header style of the following command's output.

Script naming conventions

Job submission scripts to be numbered. Numbers should be sequential even if task aren't necessarily. Job submission scripts that "start" with batch, indicated an array job with some element of parallelisation across samples (not necessarily 1 job per sample).

Processing scripts not numbered.

Job submission script format

SLURM scheduler

Start with a series of check to confirm variables are as expected.

use dashed line to separate checks from main body

Processing script format

## <single line description>

## REQUIRES the following variables from config file

# <comma separated list>

## REQUIRES the following software

# <comma separated list>

## INPUT

# <description of file>

## OUTPUT

# *

## (command line) VARIABLES

#-------------------------------#

MAIN where MAIN is the code body of the script

Start with an initiation statement

End with completion statement.

Clone this wiki locally