Skip to main content

WDL formatting tips

There are multiple WDL resources on how to keep scripts clean and easy to read. The Broad Pipeline Development team suggests checking out the BioWDL style guide for tips and tricks. The team follows most of the BioWDL guidelines, with a few exceptions and additions detailed in the table below:

Style attributeBioWDL recommendationPipeline Development team WDL practice
Indentation spacingIndent 4 spacesIndent 2 spaces.
Blank linesAdd blank lines between workflow sections.No particular convention for blank lines. In general, do not add blank lines between the closing braces of a parent and child block.
Line breaksAdhere to line break limits.Do not follow specific formatting for line breaks.
Naming conventionsUse the listed naming standards.Do not follow specific naming conventions. In general, variables are lowercase underscore (python style) and alias calls use UpperCamelCase.
Task command section input argumentsN/A. No guidelines provided on formatting input arguments.Use one input argument per code line. For an example, see the STAR parameters in the StarAlign task WDL.
FilenamesN/A. No guidelines provided.Recommends renaming files to meet tool requirements, including adding or removing necessary file extensions. For example, some tools require a “.gz” extension).

Resources