def ReadList(infile, column=0, map_function=str, map_category={}):
    """read a list of values from infile.

    Use map_function to convert values.
    Use map_category, to map read values directory 
    """
    m = []
    errors = []
    for l in infile:
        if l[0] == '#':
            continue
        try:
            d = map_function(l[:-1].split('\t')[column])
        except ValueError:
            continue
        try:
            if map_category:
                d = map_category[d]
        except KeyError:
            errors.append(d)
            continue
        m.append(d)
    return m, errors
