Shard input to persistent jobs at raw pipe speed.
Project description
partake
Shard input to persistent parallel jobs at the rate of a pipe.
Example
seq 0 10000000 | partake -n 10 'cat'
Install
CLI version:
pip install partake
With development dependencies:
pip install partake[dev]
Recipes
Split a SAM/BAM/CRAM file into 2 .bam chunks.
samtools view input.bam | partake -n 2 -s 1 -o {id}.bam "bash -c 'cat <(samtools view -H input.bam) - | samtools view -b'"
Here, we convert the input to SAM (plaintext) and pipe the records to stdin. We use the -s 1 option to ensure that lines are not truncated. In the command, we prepend the header to each worker's input record stream and convert back to bam. Output is 0.bam and 1.bam.
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
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 partake-0.5.1.tar.gz.
File metadata
- Download URL: partake-0.5.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a979f8a26c99cbb2ad29fa04d89eec143fd64eac4c791beee87f15f0106c610c
|
|
| MD5 |
4e76f138395030fecb1cd926a0ada572
|
|
| BLAKE2b-256 |
1e681252efe9da28d64a4d9ac50878ee8c56fad612ee097ed3160e8e8faa96bd
|
File details
Details for the file partake-0.5.1-py3-none-any.whl.
File metadata
- Download URL: partake-0.5.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ee3fb40c87ea7d9b98dcc73db57a674c11b40628d5eed63ea9e73d340965a02
|
|
| MD5 |
d32205a3c0041bd7e40802114e4d264f
|
|
| BLAKE2b-256 |
46c63f3236c4b90211b0da84ecef2a4b08a436c33377271debf5782da38a4943
|