import csv


def load_phenos(phenos_in):
    """
    Load mappings of sample ID : phenotype as dict
    """

    phenos = {}

    with open(phenos_in) as fin:
        reader = csv.reader(fin, delimiter='\t')
        for child, pheno in reader:
            if child not in phenos.keys():
                phenos[child] = pheno

    return phenos