Coverage for src/python/ensembl/vep/config/sections/corpus/describe.py: 100%
15 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-18 14:41 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-18 14:41 +0000
1# See the NOTICE file distributed with this work for additional information
2# regarding copyright ownership.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14"""Options for describing a registered corpus."""
16from __future__ import annotations
18from pathlib import Path
19from typing import ClassVar
21from attrs import define, field
23from ensembl.vep.config.option_spec import option
24from ensembl.vep.config.report import REPORT_FORMATS
25from ensembl.vep.config.sections.base import ConfigSection
27__all__ = ["CorpusDescribeConfig"]
30@define(frozen=True, kw_only=True, auto_attribs=True)
31class CorpusDescribeConfig(ConfigSection):
32 """What to show about a corpus, and how.
34 Attributes:
35 select (str | None): List only the overlaps of the variant with this name, or None for
36 every overlap.
37 output_format (str | None): Table format.
38 output_file (Path | None): Where to write, or None for stdout.
39 annotate (bool): Also run the configured annotator over the corpus and count its consequence
40 terms. Off by default, because it turns a listing into an annotation run.
41 """
43 section_name: ClassVar[str] = "corpus_describe"
45 select: str | None = field(default=None, metadata=option("list only this variant's overlaps"))
46 output_format: str | None = field(
47 default=None,
48 metadata=option("report format (default: markdown)", choices=REPORT_FORMATS),
49 )
50 output_file: Path | None = field(default=None, metadata=option("write output here"))
51 annotate: bool = field(default=False, metadata=option("also annotate the corpus and count its terms"))