A small package to help test and prototype snakemake rules
Project description
snaketest
instalation:
pip install snaketest
runing
A small package to help test and prototype snakemake rules
from snaketest import *
The idea is to make the prototype as copypasteable as possible Rou declare input and output by just initializing a snaketest class. You can just copy paste the content of the input, output, log, params...
input = snaketest(
table='data/table.csv',
genome='data/genome.fa',
sample = expand('data/sample/{sample}.csv',sample=[1,2,3]) #there's even an expand function
)
You can even use wildcards in them
output = snaketest(
csv='results/table_{chromosome}.csv',
)
But if you do you gotta create a wildcard SM which the other SM classes will refer to
wildcards = snaketest(
chromosome="chrY"
)
Now you can fill the code using SM variables:
import pandas as pd
df = pd.read_csv(input.table)
df = df[df['chromosome']==wildcards.chromosome]
Because all variables are in the snakemake format, you can just test and copy paste withought needing to manually change anything.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snaketest-0.0.4.tar.gz.
File metadata
- Download URL: snaketest-0.0.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
629b13f4c82c1da89856d5672096566e5e9c2b78b3b333723057a3707e6086c7
|
|
| MD5 |
c1591839469738c6f594563ed3932bcf
|
|
| BLAKE2b-256 |
7870ea122e2125b6352ae4c51c4ae2ea16bd07113aec3f602094b5b29cadf987
|
File details
Details for the file snaketest-0.0.4-py3-none-any.whl.
File metadata
- Download URL: snaketest-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94f386c27412f3d31a840452b88030353c1611e3301f2dc4964e5ccbb1ec880c
|
|
| MD5 |
b7f09ad698c1d84eccd678f598500366
|
|
| BLAKE2b-256 |
ec55e771a025ce5b62a335c8b7380a239c08bc77bc3cd74d969054f6a6869ddf
|