Reusable and maintained Luigi tasks to incorporate in bioinformatics pipelines
Project description
Bioluigi
Reusable and maintained Luigi tasks to incorporate in bioinformatics pipelines
Features
Provides Luigi tasks for tools from samtools, bcftools, STAR, RSEM, vcfanno, GATK, Ensembl VEP and much more!
Reuses as much as possible the ExternalProgramTask interface from the external_program contrib module
and extends its feature to make it work on modern scheduler such as Slurm.
Provides basic resource management for a local scheduler: all tasks are annotated with reasonable default cpus and memory parameters that can be tuned and constrained via the [resources] configuration. In the case of externally scheduled tasks, the resource management is deferred.
Provides a command-line interface for interacting more conveniently with Luigi scheduler.
bioluigi list [--status STATUS] [--user USER] [--detailed] TASK_GLOB
bioluigi show TASK_ID
Tools
Here's a list of supported tools:
- sratoolkit with
prefetchandfastq-dump - bcftools
- FastQC
- MultiQC
Schedulers
- local
- Slurm
Examples
The most convenient way of using the pre-defined tasks is to yield them dynamically in the body of the run function. It's also possible to require them since they inherit from luigi.Task.
import luigi
from bioluigi.tasks import bcftools
def MyTask(luigi.Task)
def input(self):
return luigi.LocalTarget('source.vcf.gz')
def run(self):
yield bcftools.Annotate(self.input().path,
annotations_file,
self.output().path,
...,
scheduler='slurm',
cpus=8)
def output(self):
return luigi.LocalTarget('annotated.vcf.gz')
You can define your own scheduled task by implementing the ScheduledExternalProgramTask class. Note that the default scheduler is local and will use Luigi's [resources] allocation mechanism.
import datetime
from bioluigi.scheduled_external_program import ScheduledExternalProgramTask
class MyScheduledTask(ScheduledExternalProgramTask):
scheduler = 'slurm'
walltime = datetime.timedelta(seconds=10)
cpus = 1
memory = 1
def program_args(self):
return ['sleep', '10']
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 bioluigi-0.0.13.tar.gz.
File metadata
- Download URL: bioluigi-0.0.13.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21a1e4685791eac08014bfb0d4316fc02b8b0fa9866739d76c24b6343edd753f
|
|
| MD5 |
9d0f2ed1f5553f8ed1f5c91721fa43b0
|
|
| BLAKE2b-256 |
13d8b420efa7aca99cabc63d0a9bc862918adbe80425a7d83c786ee79e576626
|
File details
Details for the file bioluigi-0.0.13-py3-none-any.whl.
File metadata
- Download URL: bioluigi-0.0.13-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8df45007f940fe9f1b942b7cccb279061e11ebad0cede71842149d81a80ede29
|
|
| MD5 |
a0efd4f2ccf9c3111f70d5f034fbc638
|
|
| BLAKE2b-256 |
aee37165b467f5eb00c6b1d3f6982c3082d4e2dbc2a245cba884ba5cca464874
|