Getting started with Snakemake

Exercise summary

Introduction - running a Snakemake workflow

Click here to access this lesson

 

Objectives:

  • learn how to fetch (setup) and run a small Snakemake pipeline (o1)
  • understand the basic architecture of Snakemake files (o2)
  • get familiar with the output log (o3)
Introduction - building your own Snakemake workflow file

This exercise is divided into 3 parts. In part 1, you will learn how to create a first basic pipeline. In the following parts, you will build on this same pipeline and improve it.

Click here to access this lesson

 

Objectives:

  • learn about rules and basic workflow concepts
  • learn how rules are linked thanks to input/output files, and the use of a target rule
  • learn how to generalise the inputs of a rule, and the expand function
  • learn how to visualise your pipeline
  • learn how to simulate the execution with dry-run

Click here to access this lesson

 

Objectives:

  • fetching file names with glob_wildcards (o1)
  • using a configuration file (o2)
  • about directives and how to access their values (o2)
  • capturing error and output streams (log) (o3)
  • about re-running options (o4)

Click here to access this lesson

 

Objectives:

  • learn how to run Snakemake on multiple processors locally
  • learn how to communicate with the OpenPBS scheduler on the I2BC cluster
  • learn how to control the software environment
  • create a profile for Snakemake
  • learn how to set resources specific for each rule
Bonus: From bash script to snakemake

Click here to access this lesson

 

Objectives:

  • reinforce Snakemake concepts learnt in the previous exercises
  • learn how to adapt already existing shell scripts into a Snakemake workflow

Don’t hesitate to look through Snakemake’s documentation for any concepts your are not sure about. There’s also a page dedicated to the recommended practices with file organisation etc. in Snakemake here and here.

Scroll to Top