name = 'mcmc_', mem = 3) #LAUNCH EYEBALL JOBS eyeball.launch() #RETURN A LIST OF LAUNCHED JOBS return dict(cmds=eyeball.cmds, inputs = inp_dicts) def run_single(run_id): ''' Given an input dictionary containing a single paramater set run mcmc in matlab using bs_macros.run_matlab. ''' input_dict = butils.load_data(run_id,'input') return bsm.runmat('run_mcmc', input_dict, run_id) if __name__ == '__main__': run_id = sys.argv[2] run_func = globals()[sys.argv[1]] output_dict = run_func(run_id) if output_dict == None: output_dict = {'blank':'Nothing output in call to {0}'.\ format(sys.argv[1])} bsu.save_data( output_dict, run_id, 'output')
inp_dicts.append(dict(similarities=sims, self_similarity=percentile(sims.flatten(), p))) else: inp_dicts = butils.load_data(run_id, "input") eyeball = bsub.eyeball( run_id, os.path.abspath(inspect.stack()[0][1]), inp_dicts, func="test_bsubfun", name=run_id + "_test_", mem=2 ) eyeball.launch() eyeball.await() eyeball.package() eyeball.complete() def usage(): print """ usage: bsub_clusters function run_id Call function with run_id. """ exit(1) if __name__ == "__main__": run_id = sys.argv[2] run_func = globals()[sys.argv[1]] output_dict = run_func(run_id) if output_dict == None: output_dict = {"blank": "Nothing output in call to {0}".format(sys.argv[1])} butils.save_data(output_dict, run_id, "output")
In any event, the family name is stored in the input dict so there will be no problems running the script is the run_id does not conform to this format. ''' inp_dict = bsub.load_data(run_id, 'input') inp_run_id = inp_dict['inp_run_id'] rfid = inp_dict['family'] output = tutils.run(rfid, run_id, inp_run_id, reset=True) return output def usage(): print ''' usage: rna_ali2d function run_id Call function with run_id. ''' exit(1) if __name__ == '__main__': run_id = sys.argv[2] run_func = globals()[sys.argv[1]] output_dict = run_func(run_id) if output_dict == None: output_dict = {'blank':'Nothing output in call to {0}'.\ format(sys.argv[1])} bsu.save_data(output_dict, run_id, 'output')
eyeball = bsub.eyeball(run_id, os.path.abspath(inspect.stack()[0][1]), inp_dicts, func='test_bsubfun', name=run_id + '_test_', mem=2) eyeball.launch() eyeball. await () eyeball.package() eyeball.complete() def usage(): print ''' usage: bsub_clusters function run_id Call function with run_id. ''' exit(1) if __name__ == '__main__': run_id = sys.argv[2] run_func = globals()[sys.argv[1]] output_dict = run_func(run_id) if output_dict == None: output_dict = {'blank':'Nothing output in call to {0}'.\ format(sys.argv[1])} butils.save_data(output_dict, run_id, 'output')