Skip to main content

Reusable and maintained Luigi tasks to incorporate in bioinformatics pipelines

Project description

Bioluigi

Python package Documentation Status

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:

Schedulers

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bioluigi-0.0.15.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

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

bioluigi-0.0.15-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file bioluigi-0.0.15.tar.gz.

File metadata

  • Download URL: bioluigi-0.0.15.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for bioluigi-0.0.15.tar.gz
Algorithm Hash digest
SHA256 720bd80b9d8d5fbe72ee157c025893de50fe211b8c536ec083bf9a5fdf1e2cb5
MD5 9c30691ba075e37f3915d5626dbf2afb
BLAKE2b-256 c4a3c7787c5b999a6eb38e5e16f136ca554e43edf29f2ea459515cd2873b00c9

See more details on using hashes here.

File details

Details for the file bioluigi-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: bioluigi-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for bioluigi-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 2ae41fb66c66901a375d7bb1566ab6ef968a5b369ba00af80995367f1500baa1
MD5 d8706f55b6fc168880615de8f1a1c01f
BLAKE2b-256 e8b9b6367ca535867a911e0a245d3a7b007f823d2f77508376190b581ff4ec6a

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