def bed_map_region_id_to_seq_id(in_bed_file):
    """
    Read in .bed file, and store for each region ID (column 4) the sequence
    ID (column 1)
    Return dictionary with mappings region ID -> sequence ID

    >>> test_bed = "test_data/test3.bed"
    >>> bed_map_region_id_to_seq_id(test_bed)
    {'CLIP2': 'chr1', 'CLIP1': 'chr2', 'CLIP3': 'chr1'}

    """
    regid2seqid_dic = {}
    # Open input .bed file.
    with open(in_bed_file) as f:
        for line in f:
            cols = line.strip().split("\t")
            seq_id = cols[0]
            site_id = cols[3]
            regid2seqid_dic[site_id] = seq_id
    f.closed
    return regid2seqid_dic