scout/utils/acmg.py
def is_pathogenic(pvs, ps_terms, pm_terms, pp_terms):
    """Check if the criterias for Pathogenic is fullfilled

    The following are descriptions of Pathogenic clasification from ACMG paper:

    Pathogenic
      (i) 1 Very strong (PVS1) AND
        (a) ≥1 Strong (PS1–PS4) OR
        (b) ≥2 Moderate (PM1–PM6) OR
        (c) 1 Moderate (PM1–PM6) and 1 supporting (PP1–PP5) OR
        (d) ≥2 Supporting (PP1–PP5)
      (ii) ≥2 Strong (PS1–PS4) OR
      (iii) 1 Strong (PS1–PS4) AND
        (a)≥3 Moderate (PM1–PM6) OR
        (b)2 Moderate (PM1–PM6) AND ≥2 Supporting (PP1–PP5) OR
        (c)1 Moderate (PM1–PM6) AND ≥4 supporting (PP1–PP5)

    Args:
        pvs(bool): Pathogenic Very Strong
        ps_terms(list(str)): Pathogenic Strong terms
        pm_terms(list(str)): Pathogenic Moderate terms
        pp_terms(list(str)): Pathogenic Supporting terms

    Returns:
        bool: if classification indicates Pathogenic level
    """
    if pvs:
        # Pathogenic (i)(a):
        if ps_terms:
            return True
        if pm_terms:
            # Pathogenic (i)(c):
            if pp_terms:
                return True
            # Pathogenic (i)(b):
            if len(pm_terms) >= 2:
                return True
        # Pathogenic (i)(d):
        if len(pp_terms) >= 2:
            return True
    if ps_terms:
        # Pathogenic (ii):
        if len(ps_terms) >= 2:
            return True
        # Pathogenic (iii)(a):
        if pm_terms:
            if len(pm_terms) >= 3:
                return True
            elif len(pm_terms) >= 2:
                if len(pp_terms) >= 2:
                    return True
            elif len(pp_terms) >= 4:
                return True
    return False
def is_pathogenic(pvs, ps_terms, pm_terms, pp_terms):
    if pvs:
        # Pathogenic (i)(a):
        if ps_terms:
            return True
        if pm_terms:
            # Pathogenic (i)(c):
            if pp_terms:
                return True
            # Pathogenic (i)(b):
            if len(pm_terms) >= 2:
                return True
        # Pathogenic (i)(d):
        if len(pp_terms) >= 2:
            return True
    if ps_terms:
        # Pathogenic (ii):
        if len(ps_terms) >= 2:
            return True
        # Pathogenic (iii)(a):
        if pm_terms:
            if len(pm_terms) >= 3:
                return True
            elif len(pm_terms) >= 2:
                if len(pp_terms) >= 2:
                    return True
            elif len(pp_terms) >= 4:
                return True
    return False
def is_pathogenic ( pvs , ps_terms , pm_terms , pp_terms ) : if pvs : # Pathogenic (i)(a): if ps_terms : return True if pm_terms : # Pathogenic (i)(c): if pp_terms : return True # Pathogenic (i)(b): if len ( pm_terms ) >= 2 : return True # Pathogenic (i)(d): if len ( pp_terms ) >= 2 : return True if ps_terms : # Pathogenic (ii): if len ( ps_terms ) >= 2 : return True # Pathogenic (iii)(a): if pm_terms : if len ( pm_terms ) >= 3 : return True elif len ( pm_terms ) >= 2 : if len ( pp_terms ) >= 2 : return True elif len ( pp_terms ) >= 4 : return True return False
Check if the criterias for Pathogenic is fullfilled

    The following are descriptions of Pathogenic clasification from ACMG paper:

    Pathogenic
      (i) 1 Very strong (PVS1) AND
        (a) ≥1 Strong (PS1–PS4) OR
        (b) ≥2 Moderate (PM1–PM6) OR
        (c) 1 Moderate (PM1–PM6) and 1 supporting (PP1–PP5) OR
        (d) ≥2 Supporting (PP1–PP5)
      (ii) ≥2 Strong (PS1–PS4) OR
      (iii) 1 Strong (PS1–PS4) AND
        (a)≥3 Moderate (PM1–PM6) OR
        (b)2 Moderate (PM1–PM6) AND ≥2 Supporting (PP1–PP5) OR
        (c)1 Moderate (PM1–PM6) AND ≥4 supporting (PP1–PP5)

    Args:
        pvs(bool): Pathogenic Very Strong
        ps_terms(list(str)): Pathogenic Strong terms
        pm_terms(list(str)): Pathogenic Moderate terms
        pp_terms(list(str)): Pathogenic Supporting terms

    Returns:
        bool: if classification indicates Pathogenic level
Check if the criterias for Pathogenic is fullfilled