Job.Runner API¶
The Runner contains the methods needed to configure and start a Toil run.
- class Job.Runner[source]
Used to setup and run Toil workflow.
- static getDefaultArgumentParser(jobstore_as_flag=False)[source]
Get argument parser with added toil workflow options.
This is the Right Way to get an argument parser in a Toil Python workflow.
- Parameters:
jobstore_as_flag (
bool) – make the job store option a –jobStore flag instead of a required jobStore positional argument.- Return type:
ArgumentParser- Returns:
The argument parser used by a toil workflow with added Toil options.
- static getDefaultOptions(jobStore=None, jobstore_as_flag=False)[source]
Get default options for a toil workflow.
- static addToilOptions(parser, jobstore_as_flag=False)[source]
Adds the default toil options to an
optparseorargparseparser object.Consider using
getDefaultArgumentParser()instead, which will produce a parser of the correct class to use Toil’s config file and environment variables. If ther parser passed here is just anargparse.ArgumentParserand not aconfigargparse.ArgParser, the Toil config file and environment variables will not be respected.- Parameters:
parser (
OptionParser|ArgumentParser) – Options object to add toil options to.jobstore_as_flag (
bool) – make the job store option a –jobStore flag instead of a required jobStore positional argument.
- Return type:
- static startToil(job, options)[source]
Run the toil workflow using the given options.
Deprecated by toil.common.Toil.start.
(see Job.Runner.getDefaultOptions and Job.Runner.addToilOptions) starting with this job. :type job:
Job:param job: root job of the workflow :raises: toil.exceptions.FailedJobsException if at the end of function there remain failed jobs. :rtype:Any:return: The return value of the root job’s run function.