def parse_clusters(cluster_file):
    """
    expects one line per cluster, tab separated:
        cluster_1_rep  member_1_1 member 1_2 ...
        cluster_2_rep  member_2_1 member_2_2 ...
        """
    cluster_dict = {}
    with open(cluster_file) as LINES:
        for line in LINES:
            genes = line.strip().split("\t")
            rep = genes[0]
            for gene in genes:
                cluster_dict[gene] = rep
    return cluster_dict