Coverage for src/python/ensembl/vep/workflow/tracks/custom.py: 100%
11 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"""Custom annotation tracks.
16A placeholder: ``CustomOverlapFinder`` and the ``CustomFeature`` model exist, but no reader parses
17a ``--custom`` spec, so a run that asks for one is told rather than quietly annotating without it.
18``--custom`` is repeatable, so this is the builder that returns one track per occurrence once the
19readers exist.
20"""
22from __future__ import annotations
24from typing import Any
26from ensembl.vep.config import Config
27from ensembl.vep.workflow.tracks.base import AnnotationTrack, TrackResources
28from ensembl.vep.workflow.tracks.registry import register_track
30__all__ = ["build_custom_tracks"]
33@register_track("custom")
34def build_custom_tracks(
35 config: Config,
36 resources: TrackResources,
37) -> tuple[AnnotationTrack[Any], ...]:
38 """Build no tracks, or refuse a run that asked for custom annotation.
40 Raises:
41 NotImplementedError: If ``--custom`` was given.
42 """
43 del resources
44 if config.source.custom:
45 raise NotImplementedError("custom annotation sources are not implemented yet")
46 return ()