def combine(lib, pos):
    'generate combinations of up to 7.\n    @param lib: library\n    @param pos: positions to mutate\n    # TODO: implement in readable (recursively)\n    '
    numseqs = 1
    for each in lib:
        numseqs *= len(each)
    logger.info('Generating %s %s', numseqs, 'sequeces. Please wait.')
    seqlib = []
    logger.info('Library %s, Positions %s', lib, pos)
    for every in lib[0]:
        if (len(pos) > 1):
            for (every2,) in lib[1]:
                if (len(pos) > 2):
                    for (every3,) in lib[2]:
                        if (len(pos) > 3):
                            for (every4,) in lib[3]:
                                if (len(pos) > 4):
                                    for (every5,) in lib[4]:
                                        if (len(pos) > 5):
                                            for (every6,) in lib[5]:
                                                if (len(pos) > 6):
                                                    for every7 in lib[6]:
                                                        seqlib.append([every, every2, every3, every4, every5, every6, every7])
                                                else:
                                                    seqlib.append([every, every2, every3, every4, every5, every6])
                                        else:
                                            seqlib.append([every, every2, every3, every4, every5])
                                else:
                                    seqlib.append([every, every2, every3, every4, every4])
                        else:
                            seqlib.append([every, every2, every3])
                else:
                    seqlib.append([every, every2])
        else:
            seqlib.append([every])
    return seqlib
generate combinations of up to 7.
@param lib: library
@param pos: positions to mutate
# TODO: implement in readable (recursively)
def combine(lib, pos):
    'generate combinations of up to 7.\n    @param lib: library\n    @param pos: positions to mutate\n    # TODO: implement in readable (recursively)\n    '
    numseqs = 1
    for each in lib:
        numseqs *= len(each)
    logger.info('Generating %s %s', numseqs, 'sequeces. Please wait.')
    seqlib = []
    logger.info('Library %s, Positions %s', lib, pos)
    for every in lib[0]:
        if (len(pos) > 1):
            for (every2,) in lib[1]:
                if (len(pos) > 2):
                    for (every3,) in lib[2]:
                        if (len(pos) > 3):
                            for (every4,) in lib[3]:
                                if (len(pos) > 4):
                                    for (every5,) in lib[4]:
                                        if (len(pos) > 5):
                                            for (every6,) in lib[5]:
                                                if (len(pos) > 6):
                                                    for every7 in lib[6]:
                                                        seqlib.append([every, every2, every3, every4, every5, every6, every7])
                                                else:
                                                    seqlib.append([every, every2, every3, every4, every5, every6])
                                        else:
                                            seqlib.append([every, every2, every3, every4, every5])
                                else:
                                    seqlib.append([every, every2, every3, every4, every4])
                        else:
                            seqlib.append([every, every2, every3])
                else:
                    seqlib.append([every, every2])
        else:
            seqlib.append([every])
    return seqlib