Example #1
0
 def do_work(task):
     method_name, suite_name, data_set, options = task
     logging.info('Running %s', task)
     suite = suite_for_name(suite_name)
     fasta = suite.get_fasta_file_for_data_set(data_set)
     predictions = F.run_as_subprocess(
         "stempy.run_dataset",
         "run_dataset",
         method_name,
         suite_name,
         data_set,
         fasta,
         options
     )
     predictions_by_dataset.append((data_set, fasta, predictions))
Example #2
0
        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):
                method_name, suite_name, data_set, options = task
                logging.info('Running %s', task)
                suite = suite_for_name(suite_name)
                fasta = suite.get_fasta_file_for_data_set(data_set)
                predictions = F.run_as_subprocess(
                    "stempy.run_dataset",
                    "run_dataset",
                    method_name,
                    suite_name,