Skip to main content

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

partake-0.5.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

partake-0.5.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

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

Hashes for partake-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a979f8a26c99cbb2ad29fa04d89eec143fd64eac4c791beee87f15f0106c610c
MD5 4e76f138395030fecb1cd926a0ada572
BLAKE2b-256 1e681252efe9da28d64a4d9ac50878ee8c56fad612ee097ed3160e8e8faa96bd

See more details on using hashes here.

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

Hashes for partake-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ee3fb40c87ea7d9b98dcc73db57a674c11b40628d5eed63ea9e73d340965a02
MD5 d32205a3c0041bd7e40802114e4d264f
BLAKE2b-256 46c63f3236c4b90211b0da84ecef2a4b08a436c33377271debf5782da38a4943

See more details on using hashes here.

Supported by

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