def read_iupred(file):
    """
    Read disorder predictions produced by IUPRED2 from the .dis file
    Inputs:
        - file: Filename of the .dis file output by IUPRED2
    Returns:
        - prot: Protein sequence (string)
        - dis:  List of predicted disorder (values between 0 and 1)
    """
    
    f = open(file, 'r')
    dis = []
    prot = ''
    
    for line in f:
        if '#' in line:
            continue
        tokens = line.split()
        assert len(tokens) == 3
        
        prot += tokens[1]
        dis.append(float(tokens[2]))
        
    f.close()
    return prot, dis