snakescale
Non-strict wrappers for the data pipelining language Snakemake.
❯ pip install 'snakescale[full]'
Features:
- Do the wrappers in the official wrapper repository get you half of the way to writing rules in only Python syntax?
- Do want your rules fully parameterized with the
input,output,resources, andparamskeys only? - Do you want to use the builtin Python types as values to a rule?
- Do you want to use the Snakemake resource system for JVM resources?
- Do you want a Snakemake wrapper which hard-codes as little as possible besides the style of the CLI it's wrapping? Read the documentation at: snakescale.readthedocs.io
- Snakescale does all this and is conda environment compatible!
This project aims to wrap bioinformatics utilities with style and variable converters instead of strict, inflexible shell templates. The wrappers in this project are unaware of the command line flags of the tool the wrapper is wrapping!
Example
from snakescale import scale
rule bedtools_subtract:
input:
a='data/a.bed',
b='data/b.bed'
output: 'data/result.bed'
params:
no_name_check=True,
g='data/ref.genome'
wrapper: scale('bedtools', 'subtract')
Which executes this under the hood:
❯ bedtools subtract -a data/a.bed -b data/b.bed -nonamecheck -g data/ref.genome > data/result.bed
By invoking the following:
❯ snakemake -F --use-conda
Building DAG of jobs...
Creating conda environment .../bedtools/subtract/environment.yaml...
Downloading remote packages.
Environment for .../bedtools/subtract/environment.yaml created (location: .snakemake/conda/32f9fcde)
Using shell: /usr/local/bin/bash
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
count jobs
1 bedtools_subtract
1
[Fri Dec 28 13:13:47 2018]
rule bedtools_subtract:
input: data/a.bed, data/b.bed
output: data/result.bed
jobid: 0
Activating conda environment: .snakemake/conda/32f9fcde
[Fri Dec 28 13:13:47 2018]
Finished job 0.
1 of 1 steps (100%) done
Complete log: .snakemake/log/2018-12-28T131312.471617.snakemake.log
Metadata
Release files for snakescale 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| snakescale-0.8.0.tar.gz | 9.0 kB | Details |
Release files / snakescale-0.8.0.tar.gz
| Download URL | snakescale-0.8.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d36c082e86443d6269e25138f8dab54a736914386a0cbe0f96638ba008df3bd
|
|
BLAKE2b-256 checksum How to use checksums |
233af579c754a4e1f53e13cdf4a71ac0af69e60adcbfc7bbd26f19fded84ecf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|