Getting started with Snakemake

Exercise 1B - improving your snakefile

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

In this part of Exercise 1, we’ve seen:
  • how to get file names from the file system directly (o1)
  • how to use a configuration file to specify paths and parameters outside of the code (o2)
  • more about specifying directive values & ways of calling them within the shell directive (o2)
  • quick demo on how to integrate your Python skills into Snakemake  (o2)
  • how to redirect stdout and stderr streams (log) (o3)
  • re-running options (o4)
Some more useful options when running Snakemake
– print the reason for each rule execution: -r --reason (for Snakemake version <8 only)
– print a summary and status of a rule: -D
– automatically create HTML reports (--report report.html) containing runtime statistics, a visualisation of the workflow topology, used software and data provenance information (need to add the jinja2 package as a dependency)

question mark all Snakemake options

In the last part (part C) of this Exercise, we will see how to adapt your pipeline to an HPC environment:
  • how to upscale your pipeline
  • how to control the resources used
  • how to control the software environment used
Scroll to Top