SkillAgentSearch skills...

Snk

Snakemake workflow management system and CLI generation tool

Install / Use

/learn @Wytamma/Snk
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Snk

PyPI - Version PyPI - Python Version write-the - docs status


Documentation: <a href="https://snk.wytamma.com" target="_blank">https://snk.wytamma.com</a>

Source Code: <a href="https://github.com/Wytamma/snk" target="_blank">https://github.com/Wytamma/snk</a>

Paper: <a href="[https://github.com/Wytamma/snk](https://joss.theoj.org/papers/10.21105/joss.0741)" target="_blank">https://joss.theoj.org/papers/10.21105/joss.07410</a>


Snk (pronounced snek) is a Snakemake workflow management system. Snk allows you to install Snakemake workflows as dynamically generated Command Line Interfaces (via snk-cli). Using a workflow as a CLI increases its interoperability and allows complex workflows to be used as modular components in a larger system.

Installation

From bioconda:

conda create -n snk bioconda::snk

From PyPI:

pip install snk

Basic Use

Install a workflow as a CLI

The snk install command can be use to install Snakemake workflows as CLIs. Snk can install Snakemake workflows from GitHub repos or local paths.

snk install wytamma/snk-basic-pipeline

Successfully installed snk-basic-pipeline (ff034f1b)!

The snk install command is flexible and can be used to install diverse workflows. For example, the dna-seq-gatk-variant-calling workflow (v2.1.1) as variant-calling with Snakemake v8.10.8 and Pandas and NumPy dependency. An index of publicly available Snakemake workflows can be found on the snakemake workflow catalog.

snk install \
  snakemake-workflows/dna-seq-gatk-variant-calling \
  --name variant-calling \
  --snakemake 8.10.8 \
  -d pandas==1.5.3 \
  -d numpy==1.26.4 \
  -t v2.1.1

Successfully installed variant-calling (v2.1.1)!

Manage Installed Workflows

You can list installed workflows with snk list and uninstall them with snk uninstall.

snk list

| Workflow | Version | | --- | --- | | snk-basic-pipeline | ff034f1b | | variant-calling | v2.1.1 |

snk uninstall snk-basic-pipeline

Successfully uninstalled snk-basic-pipeline!

Inspect the CLI

Snk will automatically create a fully featured CLI for the Snakemake workflow using snk-cli.

[!note] For more details on the CLI created by snk read the snk-cli docs

variant-calling --help
<img width="862" alt="cli help" src="https://github.com/Wytamma/snk/assets/13726005/3e6e4134-efe5-47e1-b6f4-81b60e1c9ea7">

View run options

Workflow configuration options are automatically generated from the snakemake config file.

variant-calling run --help
<img width="862" alt="run cli help" src="https://github.com/Wytamma/snk/assets/13726005/ef1dd9ca-1ba2-4a77-921a-4de16dd57631">

Create a DAG

Here we use the .test resources included in the workflow to create the DAG (requires graphviz).

variant-calling run -r .test/config -r .test/data --dag dag.pdf
<img width="862" alt="run cli help" src="https://github.com/Wytamma/snk/assets/13726005/0c25886c-0ab1-49ad-9fdd-315827dcaeb8">

Configure

Snk will dynamically generate config options for the CLI. For example if the config.yaml file has the option samples: config/samples.tsv you can set this option with the --samples flag.

variant-calling run --samples new.tsv

You can also configure the workflow using a config file.

variant-calling config --pretty # print the config 
variant-calling config > config.yml # save the config 
variant-calling run --config config.yml # run with config 

Documentation

Read the documentation for more information.

License

snk is distributed under the terms of the MIT license.

Citation

If you use snk in an academic setting then please cite the following article:

  • Wirth, Wytamma, Simon Mutch, and Robert Turnbull. “Snk: A Snakemake CLI and Workflow Management System.” Journal of Open Source Software 9, no. 103 (2024): 7410. DOI: 10.21105/joss.07410.

In BibTeX format:

@article{Wirth2024, 
    doi = {10.21105/joss.07410}, 
    year = {2024}, 
    publisher = {The Open Journal}, 
    volume = {9}, 
    number = {103}, 
    pages = {7410}, 
    author = {Wytamma Wirth and Simon Mutch and Robert Turnbull}, 
    title = {Snk: A Snakemake CLI and Workflow Management System}, 
    journal = {Journal of Open Source Software}
}
View on GitHub
GitHub Stars66
CategoryDevelopment
Updated13d ago
Forks3

Languages

Python

Security Score

95/100

Audited on Mar 18, 2026

No findings