bioluigi.tasks package
Submodules
bioluigi.tasks.bcftools module
bioluigi.tasks.cutadapt module
bioluigi.tasks.fastqc module
bioluigi.tasks.gatk module
bioluigi.tasks.multiqc module
bioluigi.tasks.rsem module
bioluigi.tasks.samtools module
bioluigi.tasks.sratoolkit module
bioluigi.tasks.star module
bioluigi.tasks.utils module
Collection of utilities and mixins for tasks
- class bioluigi.tasks.utils.CreateTaskOutputDirectoriesBeforeRunMixin(*args, **kwargs)[source]
Bases:
TaskEnsures that output directories exist before running the task.
- class bioluigi.tasks.utils.DynamicTaskWithOutputMixin(*args, **kwargs)[source]
Bases:
TaskExtends a task to forward its dynamic dependencies as output.
- output()[source]
The output that this Task produces.
The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single
Targetor a list ofTargetinstances.- Implementation note
If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.
See Task.output
- unpack_singleton = True
- class bioluigi.tasks.utils.DynamicWrapperTask(*args, **kwargs)[source]
Bases:
TaskSimilar to luigi.task.WrapperTask but for dynamic dependencies yielded in the body of the run() method.
- class bioluigi.tasks.utils.RemoveTaskOutputOnFailureMixin(*args, **kwargs)[source]
Bases:
TaskRemove a task outputs on failure.
This only applies for output that have a defined ‘remove’ method.
- on_failure(err)[source]
Override for custom error handling.
This method gets called if an exception is raised in
run(). The returned value of this method is json encoded and sent to the scheduler as the expl argument. Its string representation will be used as the body of the error email sent out if any.Default behavior is to return a string representation of the stack trace.
- class bioluigi.tasks.utils.TaskWithMetadataMixin[source]
Bases:
objectMixin that adds an insignificant metadata parameter to a task.
- metadata = Insignificant DictParameter (defaults to {})
- class bioluigi.tasks.utils.TaskWithOutputMixin(*args, **kwargs)[source]
Bases:
TaskExtends a luigi.WrapperTask to forward its dependencies as output.
- output()[source]
The output that this Task produces.
The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single
Targetor a list ofTargetinstances.- Implementation note
If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.
See Task.output