def get_progenies(p1, p2, x_linked=False, tolerance=0):
    """
    Returns possible progenies in a trio.
    """
    _p1 = expand_alleles(p1, tolerance=tolerance)
    _p2 = expand_alleles(p2, tolerance=tolerance)
    possible_progenies = set(tuple(sorted(x)) for x in product(_p1, _p2))
    if x_linked:  # Add all hemizygotes
        possible_progenies |= set((x, x) for x in (set(_p1) | set(_p2)))
    return possible_progenies
def get_progenies ( p1 , p2 , x_linked = False , tolerance = 0 ) : _p1 = expand_alleles ( p1 , tolerance = tolerance ) _p2 = expand_alleles ( p2 , tolerance = tolerance ) possible_progenies = set ( tuple ( sorted ( x ) ) for x in product ( _p1 , _p2 ) ) if x_linked : possible_progenies |= set ( ( x , x ) for x in ( set ( _p1 ) | set ( _p2 ) ) ) return possible_progenies
Returns possible progenies in a trio.