import re


def read_admixture(file):
    """
    Read admixture file by a pattern
    :param file: each row in the file represent an admixture,
    first word in the line represents the mixed populations,
    the rest words - sources
    :return: list of mixed population and list of their sources
    """

    pattern = r'\b\w+\b'

    with open(file, 'r') as f:
        lines = f.readlines()

    pop_admix, pop_sources_names = zip(
        *[[admix[0], admix[1:len(admix)]] for admix in [re.findall(pattern, line) for line in lines]])

    return list(pop_admix), list(pop_sources_names)