Beispiel #1
0
def run_empty():
    '''Create and run nfiles empty mutants.
    Save results in empty.results.
    '''
    outfile = 'empty.results'
    mutants = get_test_dir('empty.mutants')
    os.chdir(mutants)
    make_mutants(nfiles, wt=wild_type, mutagen=mutate.empty)
    os.chdir('..')
    run_dir(mutants, outfile)
Beispiel #2
0
def run_screen(mutation='point', mutagen=mutate.point, direction='+'):
    '''generate mutants, record results'''
    results = mutation + '.results'
    test_dir = get_test_dir(mutation + '.mutants')
    os.chdir(test_dir)
    make_mutants(nfiles, lim=lim, mode='list',
                 loci=test_loci, wt=wild_type,
                 mutagen=mutagen, direction=direction)
    os.chdir('..')
    run_dir(test_dir, results)
    assert os.path.isfile(results)
    with open(results, 'r') as f:
        assert len(list(f)) == nfiles
Beispiel #3
0
def run_point():
    results = 'point.results'
    test_dir = get_test_dir('point.mutants')
    os.chdir(test_dir)
    make_mutants(nfiles,
                 lim=2 * nfiles,
                 mode='random',
                 wt=wild_type,
                 mutation=mutate.point)
    os.chdir('..')
    run_dir(test_dir, results)
    assert os.path.isfile(results)
    with open(results, 'r') as f:
        assert len(list(f)) == nfiles