ensembl.vep.runner package#

Command runners and their registry.

Subpackages#

Submodules#

ensembl.vep.runner.base module#

The runner contract.

class ensembl.vep.runner.base.ExitCode(*values)[source]#

Bases: IntEnum

Process exit codes returned by runners.

FAILURE = 1#

The command ran and reported a failure.

OK = 0#

The command completed successfully.

USAGE = 2#

The command was invoked incorrectly.

class ensembl.vep.runner.base.Runner(config)[source]#

Bases: Protocol

One command’s execution.

Variables:
  • name (ClassVar[str]) – The registry name, following <domain>.<verb>.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections this runner reads, named by their attribute on Config. The command line is derived from exactly these, so a runner sees only the options it declares an interest in.

  • description (ClassVar[str]) – One-line description, used as the subcommand’s help text.

description: ClassVar[str]#
name: ClassVar[str]#
run()[source]#

Execute the command.

Returns:

The process exit code.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]]#

ensembl.vep.runner.explain module#

End-to-end overlap consequence explanations.

class ensembl.vep.runner.explain.Runner(config)[source]#

Bases: object

Runner for explaining one traced overlap annotation.

Variables:
  • name (ClassVar[str]) – The registry name.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections read.

  • description (ClassVar[str]) – One-line description for the subcommand list.

description: ClassVar[str] = "explain one overlap's derivation, fact by fact and rule by rule"#
name: ClassVar[str] = 'explain'#
run()[source]#

Select an overlap, annotate it with tracing on, and render the derivation.

Returns:

OK once a derivation was rendered, or the code saying why not.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'source', 'corpus', 'annotation', 'explain')#

ensembl.vep.runner.registry module#

Runner registry keyed by <domain>.<verb> names.

ensembl.vep.runner.registry.available_runners()[source]#

Return the sorted set of registered runner names.

Returns:

Every registered runner name, sorted.

Return type:

tuple[str, ...]

ensembl.vep.runner.registry.get_runner(name)[source]#

Return the registered runner class.

Return type:

type[Runner]

ensembl.vep.runner.registry.register_runner(name, *, default_for_group=False)[source]#

Register a runner class under a name.

Return type:

Callable[[RunnerT], RunnerT]

ensembl.vep.runner.registry.runner_default(group)[source]#

Return a group’s default runner, if it declares one.

Return type:

str | None

ensembl.vep.runner.registry.runner_group(name)[source]#

Return the domain part of a runner name.

Parameters:

name (str) – A runner name, e.g. “bench.matrix”.

Returns:

The part before the first dot, e.g. “bench”. A name with no dot is its own group.

Return type:

str

ensembl.vep.runner.registry.runner_groups()[source]#

Return the registered runners grouped by domain.

Returns:

Domain -> its runner names, sorted. A domain with exactly one

runner named after it is a subcommand in its own right; one with several is a group whose verbs are the subcommands.

Return type:

dict[str, tuple[str, ...]]

ensembl.vep.runner.stats module#

Annotated-file summaries and corpus fact profiles.

class ensembl.vep.runner.stats.Runner(config)[source]#

Bases: object

Runner for run summaries and corpus fact profiles.

run produces the summary as a by-product; this command re-reads one from what a run wrote (any tool’s CSQ/ANN, not only ours), or – with --profile – turns tracing on over a corpus and reports what each fact cost. The profile is opt-in because it is measurably slower.

Variables:
  • name (ClassVar[str]) – The registry name.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections read.

  • description (ClassVar[str]) – One-line description for the subcommand list.

description: ClassVar[str] = 'summarise an annotated file, or profile the facts over a corpus'#
name: ClassVar[str] = 'stats'#
run()[source]#

Build the requested report and write it.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'source', 'corpus', 'annotation', 'stats')#