Last updated: 2023-09-21

Checks: 2 0

Knit directory: snakemake_tutorial/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 656c8b4. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rproj.user/

Unstaged changes:
    Modified:   analysis/config.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Introduction

This website contains a short introduction to Snakemake intended for a biostatistics/statistical genetics audience. This tutorial is intended to be a “quick start”. We should be able to cover this material in about an hour. With the material in this tutorial, you will be able to write a basic Snakemake pipeline and execute it either locally or on a cluster.

Due to time constraints, there is lots of material that we won’t cover in this guide. Once you are started, there are several excellent resources for learning more.

This website was created for a tutorial given at the University of Michigan, so some instructions specifically reference U of M computing resources.

Pre-Requisites

In this tutorial, I will assume that you are using a computer with either a Linux or Mac operating system. If your personal computer runs Windows, I recommend doing this tutorial on one of the clusters available to you (e.g. the Biostatistics department cluster, the CSG cluster, or Great Lakes). It is possible to run Snakemake on Windows, but I do not have very much experience with this.

Tutorial

  1. Installation and Set-Up
  2. Introduction
  3. Using Snakemake to Execute Commands
  4. Wildcards, Placeholders, and expand()
  5. Multistep Workflows
  6. Params and Config Files
  7. Running on the Cluster
  8. Using Conda with Snakemake