def parse_ped(pedfile):
    """Parse the PED file and store it in a dictionary of
    {lineid: [PED_data]}"""
    ped_data = {}
    with open(pedfile, 'r') as f:
        for line in f:
            tmp = line.strip().split()
            lid = tmp[1]
            # add the line to the ped_data
            ped_data[lid] = tmp
    return (ped_data)