def read_predictions(pred_file):
    """
    Read a predictions file with format:

    SEQUENCE1  pred1  err1
    SEQUENCE2  pred2  err2
    ...        ...
    
    return a dictionary mapping sequence to prediction
    """

    out_dict = {} 
    with open(pred_file) as lines:
        for l in lines:
            if l.strip() == "" or l[0] == "#":
                continue

            col = l.split()

            key = col[0]
            pred = float(col[1])
            err  = float(col[2])
    
            out_dict[key] = (pred,err)

    return out_dict