run_simulation(args) else: start = time.time() from partitiondriver import PartitionDriver random.seed(args.seed) args.queries = utils.get_arg_list(args.queries) args.reco_ids = utils.get_arg_list(args.reco_ids) args.n_max_per_region = utils.get_arg_list(args.n_max_per_region, intify=True) args.match_mismatch = utils.get_arg_list(args.match_mismatch, intify=True) args.annotation_clustering_thresholds = utils.get_arg_list(args.annotation_clustering_thresholds, floatify=True) if len(args.n_max_per_region) != 3: raise Exception('n-max-per-region should be of the form \'x:y:z\', but I got ' + str(args.n_max_per_region)) if len(args.match_mismatch) != 2: raise Exception('match-mismatch should be of the form \'match:mismatch\', but I got ' + str(args.n_max_per_region)) parter = PartitionDriver(args) if args.action == 'build-hmms': # just build hmms without doing anything else -- you wouldn't normally do this parter.write_hmms(args.parameter_dir) elif args.action == 'cache-parameters': parter.cache_parameters() elif 'run-' in args.action: parter.run_algorithm(args.action.replace('run-', '')) elif args.action == 'partition': parter.partition() else: raise Exception('ERROR bad action ' + args.action) parter.clean() print ' total time: %.3f' % (time.time()-start)
treegen = TreeGenerator(args, args.parameter_dir + '/mean-mute-freqs.csv') treegen.generate_trees(self.args.outfname) sys.exit(0) # if not args.no_clean: # os.rmdir(reco.workdir) from recombinator import Recombinator run_simulation(args) else: from partitiondriver import PartitionDriver args.queries = utils.get_arg_list(args.queries, intify=False) args.reco_ids = utils.get_arg_list(args.reco_ids, intify=True) args.n_max_per_region = utils.get_arg_list(args.n_max_per_region) if len(args.n_max_per_region) != 3: raise Exception('ERROR n-max-per-region should be of the form \'x:y:z\', but I got' + str(args.n_max_per_region)) utils.prep_dir(args.workdir) parter = PartitionDriver(args) if args.action == 'build-hmms': # just build hmms without doing anything else -- you wouldn't normally do this parter.write_hmms(args.parameter_dir, None) sys.exit() elif args.action == 'cache-parameters': parter.cache_parameters() elif 'run-' in args.action: parter.run_algorithm(args.action.replace('run-', '')) elif args.action == 'partition': parter.partition() else: raise Exception('ERROR bad action ' + args.action)