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

    The following are descriptions of Likely Pathogenic clasification from ACMG paper:

    Likely pathogenic
      (i) 1 Very strong (PVS1) AND 1 moderate (PM1– PM6) OR
      (ii) 1 Strong (PS1–PS4) AND 1–2 moderate (PM1–PM6) OR
      (iii) 1 Strong (PS1–PS4) AND ≥2 supporting (PP1–PP5) OR
      (iv)  ≥3 Moderate (PM1–PM6) OR
      (v) 2 Moderate (PM1–PM6) AND ≥2 supporting (PP1–PP5) OR
      (vi) 1 Moderate (PM1–PM6) AND ≥4 supportin (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 Likely Pathogenic level
    """
    if pvs:
        # Likely Pathogenic (i):
        if pm_terms:
            return True

    if ps_terms:
        # Likely Pathogenic (ii):
        if pm_terms:
            return True
        # Likely Pathogenic (iii):
        if len(pp_terms) >= 2:
            return True

    if pm_terms:
        # Likely Pathogenic (iv):
        if len(pm_terms) >= 3:
            return True
        # Likely Pathogenic (v):
        elif len(pm_terms) >= 2:
            if len(pp_terms) >= 2:
                return True
        # Likely Pathogenic (vi):
        elif len(pp_terms) >= 4:
            return True

    return False
def is_likely_pathogenic(pvs, ps_terms, pm_terms, pp_terms):
    """Check if the criterias for Likely Pathogenic is fullfilled

    The following are descriptions of Likely Pathogenic clasification from ACMG paper:

    Likely pathogenic
      (i) 1 Very strong (PVS1) AND 1 moderate (PM1– PM6) OR
      (ii) 1 Strong (PS1–PS4) AND 1–2 moderate (PM1–PM6) OR
      (iii) 1 Strong (PS1–PS4) AND ≥2 supporting (PP1–PP5) OR
      (iv)  ≥3 Moderate (PM1–PM6) OR
      (v) 2 Moderate (PM1–PM6) AND ≥2 supporting (PP1–PP5) OR
      (vi) 1 Moderate (PM1–PM6) AND ≥4 supportin (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 Likely Pathogenic level
    """
    if pvs:
        # Likely Pathogenic (i):
        if pm_terms:
            return True

    if ps_terms:
        # Likely Pathogenic (ii):
        if pm_terms:
            return True
        # Likely Pathogenic (iii):
        if len(pp_terms) >= 2:
            return True

    if pm_terms:
        # Likely Pathogenic (iv):
        if len(pm_terms) >= 3:
            return True
        # Likely Pathogenic (v):
        elif len(pm_terms) >= 2:
            if len(pp_terms) >= 2:
                return True
        # Likely Pathogenic (vi):
        elif len(pp_terms) >= 4:
            return True

    return False
Check if the criterias for Likely Pathogenic is fullfilled

    The following are descriptions of Likely Pathogenic clasification from ACMG paper:

    Likely pathogenic
      (i) 1 Very strong (PVS1) AND 1 moderate (PM1– PM6) OR
      (ii) 1 Strong (PS1–PS4) AND 1–2 moderate (PM1–PM6) OR
      (iii) 1 Strong (PS1–PS4) AND ≥2 supporting (PP1–PP5) OR
      (iv)  ≥3 Moderate (PM1–PM6) OR
      (v) 2 Moderate (PM1–PM6) AND ≥2 supporting (PP1–PP5) OR
      (vi) 1 Moderate (PM1–PM6) AND ≥4 supportin (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 Likely Pathogenic level