def read_popmap(filename):
    """
    Function to read a two-column tab-separated file and save the first column as dictionary keys and second as values.
    Input: filename
    Returns: dictionary[col1] = col2.
    """
    mydict = dict()
    with open(filename, "r") as fin:
        for line in fin: # Read file line by line.
            line = line.strip()
            if not line:
                continue
            cols = line.split()
            mydict[cols[0]] = cols[1] # Make dictionary from popmap.
    return mydict