ensembl.vep.workflow.build package#

Workflow builders and their registry.

Submodules#

ensembl.vep.workflow.build.default module#

The default annotation workflow builder.

ensembl.vep.workflow.build.default.DEFAULT_TRACKS = ('consequence.transcript', 'consequence.regulatory', 'colocated', 'custom')#

Every kind of track a default run can annotate with, in output order.

Each kind decides from the configuration how many tracks it contributes, so a kind nothing asks for contributes none and the order of those that remain is this one. Transcript consequences come first because that is the order VEP writes them in.

ensembl.vep.workflow.build.default.build_default_workflow(config, resources)[source]#

Build the standard per-variant workflow from the configured tracks.

Parameters:
  • config (Config) – The run’s configuration.

  • resources (TrackResources) – What every track in the workflow shares.

Returns:

The workflow, holding one live track per configured kind.

Return type:

Workflow

ensembl.vep.workflow.build.haplo module#

The haplotype annotation workflow builder.

ensembl.vep.workflow.build.haplo.HAPLO_TRACKS = ('consequence.transcript',)#

The kinds of track a haplotype run annotates with.

Haplotype behaviour belongs to the tracks themselves rather than to runner or execution code, so this workflow differs from the default one only in which kinds it asks for.

ensembl.vep.workflow.build.haplo.build_haplo_workflow(config, resources)[source]#

Build the haplotype-aware workflow.

Return type:

Workflow

ensembl.vep.workflow.build.registry module#

Registry for workflow builders.

ensembl.vep.workflow.build.registry.available_workflows()[source]#

Return registered workflow names in sorted order.

Return type:

tuple[str, ...]

ensembl.vep.workflow.build.registry.build_workflow(config, resources, *, name=None)[source]#

Build the workflow a configuration describes.

Parameters:
  • config (Config) – The run’s configuration.

  • resources (TrackResources) – What every track in the workflow shares.

  • name (str | None, default: None) – A registered workflow name, or None for the configured command’s own.

Returns:

The runtime workflow.

Return type:

Workflow

ensembl.vep.workflow.build.registry.register_workflow(name)[source]#

Register a workflow builder under name.

Return type:

Callable[[Callable[[Config, TrackResources], Workflow]], Callable[[Config, TrackResources], Workflow]]

ensembl.vep.workflow.build.registry.workflow_builder(name)[source]#

Return the workflow builder registered under name.

Raises:

KeyError – If no builder is registered under that name.

Return type:

Callable[[Config, TrackResources], Workflow]

ensembl.vep.workflow.build.registry.workflow_for_command(command)[source]#

Return the name of the workflow a command annotates with.

Cheap enough to call before any worker starts, which is where an unimplemented command should be reported rather than inside every worker process.

Raises:

ValueError – If the command has no implemented annotation workflow.

Return type:

str