def read_panel(panel_file):
    """
    Open the panel file and return a dictionary that maps sample to popuation
    """
    map={}
    pf=open(panel_file, "r")
    for line in pf:
        bits=line.split()
        map[bits[0]]=bits[1]
        
    pops=list(set(map.values())) 
    pops.sort()   
    
    return map, pops