meme_em['niters'] = start.niters
        meme_em['em_time'] = start.em_time
        meme_em['cons'] = start.cons_after_em
        meme_em['nsites'] = start.nsites
        meme_em['sig'] = start.sig
        logging.info(
            '%s: cons0=%20s; nsites0=%3d; niters=%4d; elapsed=%7.1fs; per iteration=%6.2fs; cons=%20s; nsites0=%3d; sig=%e',
            data_set, start.cons0, start.nsites0, start.niters, start.em_time, start.em_time /
            start.niters, start.cons, start.nsites, start.sig
        )
        meme_em.append()
    h5file.close()  # Close (and flush) the HDF5 file


if '__main__' == __name__:
    #
    # parse options
    #
    parser = OptionParser()
    test_data.add_options(parser)
    stempy.add_options(parser)
    options, args = parser.parse_args()
    usage = 'USAGE: %s <options> <h5 file>' % sys.argv[0]
    if len(args) != 1:
        raise RuntimeError(usage)
    if len(args) < 1:
        raise RuntimeError(usage)
    filename = args[0]

    run(options)
示例#2
0
def add_options(options):
    stempy.add_options(options)
    meme.add_options(options)
def time_per_iteration_per_base(timings):
    return timings['duration'] / timings['niters'] / test_data.get_num_w_mers(timings['dataset'], len(timings['seed']))


if '__main__' == __name__:

    def add_options(parser):
        parser.add_option("-f", "--force", action="store_true",
                          help="Always run even if already have results.")

    #
    # parse options
    #
    options, args = stempy.parse_options(
        lambda parser: (add_options(parser), stempy.add_options(
            parser), test_data.add_options(parser))
    )

    if len(args) != 0:
        raise RuntimeError('USAGE: %s <options>', sys.argv[0])

    run(options)

    #
    # Slice and dice data
    #
    h5file = tables.openFile(filename)
    timings_table = h5file.root.EtaStability.timings
    nsite_values = list(set(row['nsites'] for row in timings_table))
    nsite_values.sort()
    time_per_iteration_per_base = [
示例#4
0
    map(suite_for_name, suite_names)

    #
    # Parse the options
    #
    from optparse import OptionParser
    option_parser = OptionParser()
    option_parser.add_option(
        "--num-threads",
        dest="num_threads",
        default=3,
        type='int',
        help="Number of threads to run jobs on."
    )
    option_parser.add_option("--data-sets", action="append")
    stem.add_options(option_parser)
    meme.add_options(option_parser)
    options = stem.parse_options(option_parser=option_parser)
    stem.turn_on_google_profiling_if_asked_for(options)

    # for each method and suite
    for method_name in method_names:
        for suite_name in suite_names:

            suite = suite_for_name(suite_name)
            method = method_for_name(method_name)

            predictions_by_dataset = []
            import cookbook.function_as_task as F

            def do_work(task):
示例#5
0
def add_options(option_parser):
    stem.add_options(option_parser)
    meme.add_options(option_parser)