def read_counts(count_file):
    """
    Read a file containing sequences vs. counts.  Returns a dictionary of 
    frequencies keyed to sequences.  
    """

    f = open(count_file,'r')
    lines = f.readlines()
    f.close()

    count_dict = {}
    for l in lines:
        if l.strip() == "" or l[0] == "#":
            continue

        col = l.split()
        seq = col[0].strip()
        counts = int(col[1])

        count_dict[seq] = counts

    return count_dict