Skip to content

Commit

Permalink
feat(mi): add generic VCF length-based calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Dec 5, 2024
1 parent 697c7be commit ad9015f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions strkit/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
CALLER_HIPSTR = "hipstr"
CALLER_LONGTR = "longtr"
CALLER_GANGSTR = "gangstr"
CALLER_GENERIC_VCF_AL = "generic-vcf-al"
CALLER_REPEATHMM = "repeathmm"
CALLER_STRAGLR = "straglr"
CALLER_STRKIT = "strkit"
Expand Down Expand Up @@ -47,6 +48,7 @@
MI_CALLERS = (
CALLER_EXPANSIONHUNTER,
CALLER_GANGSTR,
CALLER_GENERIC_VCF_AL,
CALLER_LONGTR,
CALLER_REPEATHMM,
CALLER_STRAGLR,
Expand Down
5 changes: 3 additions & 2 deletions strkit/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def _exec_mi(p_args) -> None:
from strkit.mi.base import BaseCalculator
from strkit.mi.expansionhunter import ExpansionHunterCalculator
from strkit.mi.gangstr import GangSTRCalculator
from strkit.mi.longtr import LongTRCalculator
from strkit.mi.generic_vcf import GenericVCFLengthCalculator
from strkit.mi.repeathmm import RepeatHMMCalculator
from strkit.mi.straglr import StraglrCalculator
from strkit.mi.strkit import StrKitCalculator, StrKitJSONCalculator, StrKitVCFCalculator
Expand All @@ -401,7 +401,8 @@ def _exec_mi(p_args) -> None:
calc_classes: dict[str, Type[BaseCalculator]] = {
c.CALLER_EXPANSIONHUNTER: ExpansionHunterCalculator,
c.CALLER_GANGSTR: GangSTRCalculator,
c.CALLER_LONGTR: LongTRCalculator,
c.CALLER_GENERIC_VCF_AL: GenericVCFLengthCalculator,
c.CALLER_LONGTR: GenericVCFLengthCalculator,
c.CALLER_REPEATHMM: RepeatHMMCalculator,
c.CALLER_STRAGLR: StraglrCalculator,
c.CALLER_STRKIT: StrKitCalculator,
Expand Down
4 changes: 2 additions & 2 deletions strkit/mi/longtr.py → strkit/mi/generic_vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from .result import MIContigResult, MILocusData
from .vcf_utils import VCFCalculatorMixin

__all__ = ["LongTRCalculator"]
__all__ = ["GenericVCFLengthCalculator"]


class LongTRCalculator(BaseCalculator, VCFCalculatorMixin):
class GenericVCFLengthCalculator(BaseCalculator, VCFCalculatorMixin):
def _get_sample_contigs(self) -> tuple[set, set, set]:
contigs = self.get_contigs_from_files(self._mother_call_file, self._father_call_file, self._child_call_file)
self._logger.debug(
Expand Down

0 comments on commit ad9015f

Please sign in to comment.