def get_frequencies(tabix_reader, chrom, start, alt):
    """
    Return the frequencies from a tabix indexed vcf file.
    
    Arguments:
        tabix_reader (Tabix.reader): A Tabix object
        chrom (str): The chromosome of the position
        start (str): The start position of the variant
        alt (str): The alternative sequence
    
    Returns:
        frequencies (dict): A dictionary with relevant frequencies
    """
    freq = None
    records = get_tabix_records(tabix_reader, chrom, start)

    frequencies = {}
    for record in records:
        logger.debug("Found record: {0}".format('\t'.join(record)))
        #We can get multiple rows so need to check each one
        #We also need to check each one of the alternatives per row
        for i,alternative in enumerate(record[4].split(',')):
            if alternative == alt:
                for info in record[7].split(';'):
                    info = info.split('=')
                    if ['AF', 'MAX_AF'] in info[0]:
                        freqs = info[-1].split(',')
                        frequencies[info[0]] = freqs[i]
    
    return frequencies
dataset/ETHPy150Open moonso/genmod/genmod/annotate_variants/read_tabix_files.py/get_frequencies/swapped operands of `in`