Parameterized Snakemake Workflows with CLI

public public 1yr ago 0 bookmarks

An example of parameterizing snakemake workflows with a simple CLI.

Usage:

./run <workflow_file> <parameters_file>

e.g.

rm -f hello.txt
./run workflow-hello params-amy

creates hello.txt with "hello amy" in it, while

rm -f hello.txt
./run workflow-hello params-beth

creates hello.txt with "hello beth" in it.

Here, the workflow file workflow-hello.json specifes the target hello.txt , while the parameters file params-amy parameterizes the workflow with the name "amy".

Likewise,

rm -f goodbye.txt
./run workflow-goodbye params-beth

will put goodbye beth in goodbye.txt .

All workflows use the same set of Snakemake rules in Snakefile .

See also: https://github.com/charlesreid1/2019-snakemake-cli

Code Snippets

10
11
shell:
   "echo hello {name} > {output}"
16
17
shell:
   "echo goodbye {name} > {output}"
ShowHide 2 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://github.com/ctb/2018-snakemake-cli
Name: 2018-snakemake-cli
Version: 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: None
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...