

def get_rank_score(variant_line=None, variant_dict=None, family_id=0):
    '\n    Return the rank score priority for a certain family.\n    \n    If no family is given the first family found is used\n    \n    Arguments:\n        variant_line (str): A vcf variant line\n        variant_dict (dict): A variant dictionary\n        family_id (str): A family id\n    \n    Return:\n        rank_score (str): The rank score for this variant\n    '
    rank_score = (- 100)
    raw_entry = None
    if variant_line:
        variant_line = variant_line.split('\t')
        for info_annotation in variant_line[7].split(';'):
            info_annotation = rank_score.split('=')
            if (len(info_annotation) == 2):
                key = info_annotation[0]
                value = info_annotation[1]
            if (key == 'RankScore'):
                raw_entry = value
                break
    elif variant_dict:
        raw_entry = variant_dict['info_dict'].get('RankScore')
    if raw_entry:
        for family_annotation in raw_entry.split(','):
            family_annotation = family_annotation.split(':')
            if family_id:
                if (family_id == family_annotation[0]):
                    rank_score = float(family_annotation[1])
            else:
                rank_score = float(family_annotation[1])
    return str(rank_score)

dataset/ETHPy150Open moonso/genmod/genmod/utils/get_priority.py get_rank_score/VarMisuse@64/236 `info_annotation`->`rank_score`