ensembl.vep.runner.run package#
Annotation run commands and their shared runtime.
Submodules#
ensembl.vep.runner.run.default module#
The default annotation runner.
Annotating wires three things together and then gets out of the way: the input source reads
records, a PayloadIterator groups them, and an Executor runs each payload against an
AnnotationBufferWorker. Results come back in payload order whatever the worker count, and
only detached annotations cross back, which is what keeps a run’s live model objects inside the
process that built them.
- class ensembl.vep.runner.run.default.Runner(config)[source]#
Bases:
objectRunner for annotating an input file.
- 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.
- annotate(*, show_progress=False)[source]#
Return a closable stream of annotated variants in input order.
- Parameters:
show_progress (
bool, default:False) – Show interactive progress when configuration and stderr allow it.- Returns:
The ordered stream and the summary collector it fills.
- Return type:
- Raises:
ValueError – If no input file is configured.
- description: ClassVar[str] = 'annotate variants against a set of annotation sources'#
- property input_source: PicklableVCFVariationSource#
Return the source this process reads input records with, built once.
The parent only reads: it streams records, counts them, and passes the input’s own header through. Every model is built in the worker that annotates it, so this source is given no reference sequence – reading records needs none.
Built on first use rather than in
__init__because a runner is constructed before anything has validated what it was given: a configuration naming no input file has to be reported byrun(), which turns it into a usage error, rather than raise while the runner is being built.- Returns:
The input source the configured format reads with.
- Return type:
- Raises:
ValueError – If no input file is configured.
- name: ClassVar[str] = 'run.default'#
- sections: ClassVar[tuple[str, ...]] = ('logging', 'source', 'annotation', 'execution', 'run')#
ensembl.vep.runner.run.haplo module#
The haplotype-aware annotation runner.
- class ensembl.vep.runner.run.haplo.Runner(config)[source]#
Bases:
objectPlaceholder runner for the haplotype workflow command.
- description: ClassVar[str] = 'annotate phased haplotypes'#
- name: ClassVar[str] = 'run.haplo'#
- sections: ClassVar[tuple[str, ...]] = ('logging', 'source', 'annotation', 'execution', 'run')#
ensembl.vep.runner.run.output_transaction module#
Atomic output transactions for the default annotation runner.
ensembl.vep.runner.run.progress module#
Interactive variant progress reporting.
- class ensembl.vep.runner.run.progress.VariantProgress(*, total, enabled=True, stream=<factory>, width=24)[source]#
Bases:
objectProgress renderer for completed input variants.
- Variables:
total (int | None) – Number of input variant records, or None when the input declares no count. Without one there is nothing to measure against, so the line shows what has been annotated so far and leaves out the bar, the percentage and the ETA.
enabled (bool) – Whether updates should be rendered.
stream (TextIO) – Interactive output stream.
width (int) – Character width of the progress bar.
- enabled: bool#
- stream: TextIO#
- total: int | None#
- width: int#