flo-schu/pymob-workflow

Snakemake workflow for running end-to-end parameter inference, including customizable reporting

Overview

Latest release: None, Last update: 2026-02-18

Linting: linting: failed, Formatting: formatting: failed

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Conda. It is recommended to install conda via Miniforge. Run

conda create -c conda-forge -c bioconda -c nodefaults --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

For other installation methods, refer to the Snakemake and Snakedeploy documentation.

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/flo-schu/pymob-workflow . --tag None

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow with automatic deployment of all required software via conda/mamba, use

snakemake --cores all --sdm conda

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

Config files specify the scenarios that should be computed and parameterize inference (potentially overriding configuration options set in the scenario config files).

In addition, the analyses of the estimates are selected and configured.

Linting and formatting

Linting results

 1No validator found for JSON Schema version identifier 'http://json-schema.org/draft-06/schema#'
 2Defaulting to validator for JSON Schema version 'https://json-schema.org/draft/2020-12/schema'
 3Note that schema file may not be validated correctly.
 4/tmp/tmpou4if4ad/workflow/rules/pymob_infer.smk:62: SyntaxWarning: invalid escape sequence '\['
 5/tmp/tmpou4if4ad/workflow/rules/pymob_infer.smk:87: SyntaxWarning: invalid escape sequence '\['
 6Lints for snakefile /tmp/tmpou4if4ad/workflow/rules/pymob_infer.smk:
 7    * Absolute path "/^\[simulation\]/,/^\[/p" in line 47:
 8      Do not define absolute paths inside of the workflow, since this renders
 9      your workflow irreproducible on other machines. Use path relative to the
10      working directory instead, or make the path configurable via a config
11      file.
12      Also see:
13      https://snakemake.readthedocs.io/en/latest/snakefiles/configuration.html#configuration
14    * Mixed rules and functions in same snakefile.:
15      Small one-liner functions used only once should be defined as lambda
16      expressions. Other functions should be collected in a common module, e.g.
17      'rules/common.smk'. This makes the workflow steps more readable.
18      Also see:
19      https://snakemake.readthedocs.io/en/latest/snakefiles/modularization.html#includes

Formatting results

 1[DEBUG] 
 2[DEBUG] In file "/tmp/tmpou4if4ad/workflow/rules/common.smk":  Formatted content is different from original
 3[DEBUG] 
 4[DEBUG] In file "/tmp/tmpou4if4ad/workflow/Snakefile":  Formatted content is different from original
 5[DEBUG] 
 6[DEBUG] In file "/tmp/tmpou4if4ad/workflow/rules/report.smk":  Formatted content is different from original
 7[DEBUG] 
 8<unknown>:1: SyntaxWarning: invalid escape sequence '\['
 9[DEBUG] In file "/tmp/tmpou4if4ad/workflow/rules/pymob_infer.smk":  Formatted content is different from original
10[DEBUG] 
11[DEBUG] In file "/tmp/tmpou4if4ad/workflow/rules/likelihood_landscape.smk":  Formatted content is different from original
12[INFO] 5 file(s) would be changed 😬
13
14snakefmt version: 0.11.4