def parse_map(mapfile):
    """Parse the MAP file and store it in a dictionary of
    {snpid: [MAP_data]}"""
    map_data = {}
    with open(mapfile, 'r') as f:
        for line in f:
            tmp = line.strip().split()
            snpid = tmp[1]
            # add the line to map_data
            map_data[snpid] = tmp
    return (map_data)