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.16.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.16-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bioluigi-0.0.16.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.16.tar.gz
Algorithm Hash digest
SHA256 b7114707f8370e215f82bc408a478e6c4821a2e75f9ce8d5f5e74b01f9e2a1a9
MD5 56d92d458280b9a59463d9a3b1dbe17c
BLAKE2b-256 f1bbb21fed16ca191e07bc1493e023d6c614557444d0d2fafad1b27bad789ce4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bioluigi-0.0.16-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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 351231865d597ec6a7f97502e7d9efc8284859655221c757d038de3101fee1a5
MD5 641afe3c95aa5f30c9a3024d9579fe75
BLAKE2b-256 47b3716471867f494edf991a1c952d86c31b372cfc2f00704a591507dcadda69

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