Getting started with Snakemake

Exercise 1C - optimising resource usage

objective > setup > o1 > o2 > o3 > o4 > o5 > recap

We’ve seen:
  • how to run Snakemake on multiple processors locally (o1)
  • how to communicate with the OpenPBS scheduler on the I2BC cluster (o2)
  • how to control the software environment (o3)
  • how to create an HPC profile file for Snakemake (o4)
  • how to optimise resource usage per rule (o5)

We also learnt in the previous parts of this exercise:

  • snakefile: rule and workflow concepts
  • how rules are linked thanks to input/output files, and the use of a first/target rule (i.e. “all”)
  • how to generalise the inputs of a rule using wildcards on filenames (and the expand function)
  • how to visualise your workflow
  • how to perform a dry run
  • how to redirect stdout and stderr streams (log)
  • more about using wildcards within the shell directive
  • how to use a configuration file
  • how to add parameters through the params directive
  • how to get file names from the file system directly
Some extra information about software environment

Of note, Snakemake also supports conda/mamba environments and containers (docker, singularity and apptainer) in the same way as it supports module environments.

Scroll to Top