Coverage for src/python/ensembl/vep/runner/run/haplo.py: 83%

18 statements  

« 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"""The haplotype-aware annotation runner.""" 

15 

16from __future__ import annotations 

17 

18import logging 

19from typing import ClassVar 

20 

21from ensembl.vep.config import Config 

22from ensembl.vep.runner.base import ExitCode 

23from ensembl.vep.runner.registry import register_runner 

24 

25__all__ = ["Runner"] 

26 

27logger = logging.getLogger(__name__) 

28 

29 

30@register_runner("run.haplo") 

31class Runner: 

32 """Placeholder runner for the haplotype workflow command.""" 

33 

34 name: ClassVar[str] = "run.haplo" 

35 sections: ClassVar[tuple[str, ...]] = ( 

36 "logging", 

37 "source", 

38 "annotation", 

39 "execution", 

40 "run", 

41 ) 

42 description: ClassVar[str] = "annotate phased haplotypes" 

43 

44 def __init__(self, config: Config) -> None: 

45 """Store the resolved configuration.""" 

46 self.config = config 

47 

48 def run(self) -> ExitCode: 

49 """Report that the haplotype input pipeline is not implemented yet.""" 

50 logger.error("haplotype annotation is not available yet") 

51 return ExitCode.USAGE