def determine_genotype(likelihoods, threshold_prob):
    """given genotype likelihoods for 0/0,0/1,1/1, determines likeliest genotype"""
    to_sort = [(likelihoods[0], 0), (likelihoods[1], 1), (likelihoods[2], 2)]
    to_sort.sort(key=lambda x: x[0])
    if to_sort[2][0] > to_sort[1][0] and to_sort[2][0] > threshold_prob:
        return to_sort[2][1]
    else:
        return -1
