def popnames_parser(popnames_file):
    """
    Parses a file with population names and returns a list with these names.
    The order must be the same as in the baypass input files (geno and env).
    """
    popnames = []
    popfile = open(popnames_file, 'r')
    for lines in popfile:
        popnames.append(lines.strip())
    popfile.close()
    return popnames
