scout/parse/variant/conservation.py
def parse_conservation(variant, info_key):
    """Get the conservation prediction

        Args:
            variant(dict): A variant dictionary
            info_key(str)

        Returns:
            conservations(list): List of censervation terms
    """
    raw_score = variant.INFO.get(info_key)
    conservations = []

    if raw_score:
        if isinstance(raw_score, numbers.Number):
            raw_score = (raw_score,)

        for score in raw_score:
            if score >= CONSERVATION[info_key]['conserved_min']:
                conservations.append('Conserved')
            else:
                conservations.append('NotConserved')

    return conservations
def parse_conservation(variant, info_key):
    raw_score = variant.INFO.get(info_key)
    conservations = []

    if raw_score:
        if isinstance(raw_score, numbers.Number):
            raw_score = (raw_score,)

        for score in raw_score:
            if score >= CONSERVATION[info_key]['conserved_min']:
                conservations.append('Conserved')
            else:
                conservations.append('NotConserved')

    return conservations
def parse_conservation ( variant , info_key ) : raw_score = variant . INFO . get ( info_key ) conservations = [ ] if raw_score : if isinstance ( raw_score , numbers . Number ) : raw_score = ( raw_score , ) for score in raw_score : if score >= CONSERVATION [ info_key ] [ 'conserved_min' ] : conservations . append ( 'Conserved' ) else : conservations . append ( 'NotConserved' ) return conservations
Get the conservation prediction

        Args:
            variant(dict): A variant dictionary
            info_key(str)

        Returns:
            conservations(list): List of censervation terms
Get the conservation prediction