def check_vep_annotation(variant):
    """
    Return a set with the genes that vep has annotated this variant with.
    
    Vep annotates all variants but we are only interested in the exonic ones.
    The terms are specified in INTERESTING_SO_TERMS
    
    Arguments:
        variant (dict): A variant dictionary
    
    Returns:
        annotation (set): A set with genes
    """
    
    annotation = set()
    # vep_info is a dictionary with genes as key and annotation as values
    ##TODO use extract_vcf to get the annotation here
    
    vep_info = variant.get('vep_info',{})
    
    for allele in vep_info:
        for vep_annotation in variant['vep_info'][allele]:
            for consequence in vep_annotation.get('Consequence', {}).split('&'):
                # These are the SO terms that indicate that the variant 
                # belongs to a gene
                if consequence in INTERESTING_SO_TERMS:
                    annotation.add(vep_annotation.get('Gene', ''))
    return annotation
dataset/ETHPy150Open moonso/genmod/genmod/utils/get_features.py/check_vep_annotation/original