Skip to main content

Simplify writing dual use scripts for CLI and Snakemake

Project description

SnaCLI

SnaCLI is a library which simplifies writing scripts which can be both run directly from the command line (based on docopt), as well as be called in a Snakemake file.

Introduction

In the Snakemake workflow management system, tasks can call Python scripts and pass them input, output and log filenames as well as global configuration values and non-filename parameters.

The system for passing and accessing these arguments is different to that adopted by command line tools (for example using the docopt library).

SnaCLI allows to easily combine the two approaches (docopt and snakemake) for providing arguments to a script. Script based on SnaCLI can be invoked both from the command line and from snakemake. Inside the script, the same code can be used in both cases, without modifications.

Usage

The usage of the library is explained in the user manual.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snacli-1.2.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

snacli-1.2-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page