Skip to main content

Snk

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


Documentation: https://snk.wytamma.com

Source Code: https://github.com/Wytamma/snk


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
cli help

View run options

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

variant-calling run --help
run cli help

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
run cli help

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}
}

Metadata

Release files for snk 0.31.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snk 0.31.1
File Size Uploaded
snk-0.31.1.tar.gz 563.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snk 0.31.1
File Interpreter ABI Platform
snk-0.31.1-py3-none-any.whl Python 3 none any Details

Total release size: 578.2 kB

Release files / snk-0.31.1.tar.gz

Download URL snk-0.31.1.tar.gz
Size 563.1 kB
Tags Source
SHA-256 checksum
How to use checksums
53ce4d915eb68dc4ee807cd1799109b2eb653eb363398bb0307ff682963de00c
BLAKE2b-256 checksum
How to use checksums
289d7c988ff3b2cfb48e948316f163d86383f9947623ee26ab8f06d5af963eaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / snk-0.31.1-py3-none-any.whl

Download URL snk-0.31.1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbd5ae633152fef642576bdbf03d24d6422c8e42d8838c8a627af2828b480dfe
BLAKE2b-256 checksum
How to use checksums
edac13d4cdce3c80d48aa7cf9a0be53975c529a6eeb50d5626fa5c7ca167af96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

0.31.1 This release

2 release files

0.31.0

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.27.2

2 release files

0.26.0

2 release files

0.25.1

2 release files

0.25.0

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.22.3

2 release files

0.22.2

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.2

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.2

2 release files

0.13.0

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page