run_info_yaml = os.path.abspath(run_info_yaml) if kwargs.get("workflow"): kwargs["inputs"] = inputs kwargs["config_file"] = global_config kwargs["fc_dir"] = fc_dir kwargs["run_info_yaml"] = run_info_yaml return kwargs if __name__ == "__main__": kwargs = parse_cl_args(sys.argv[1:]) if "upgrade" in kwargs and kwargs["upgrade"]: install.upgrade_bcbio(kwargs["args"]) elif "server" in kwargs and kwargs["server"]: server_main.start(kwargs["args"]) elif "runfn" in kwargs and kwargs["runfn"]: runfn.process(kwargs["args"]) elif "graph" in kwargs and kwargs["graph"]: graph.bootstrap(kwargs["args"]) elif "version" in kwargs and kwargs["version"]: programs.write_versions({"work": kwargs["args"].workdir}) elif "sequencer" in kwargs and kwargs["sequencer"]: machine.check_and_postprocess(kwargs["args"]) else: if kwargs.get("workflow"): setup_info = workflow.setup(kwargs["workflow"], kwargs.pop("inputs")) if setup_info is None: # no automated run after setup sys.exit(0) workdir, new_kwargs = setup_info os.chdir(workdir) kwargs.update(new_kwargs) main(**kwargs)
if kwargs.get("workflow"): kwargs["inputs"] = inputs kwargs["config_file"] = global_config kwargs["fc_dir"] = fc_dir kwargs["run_info_yaml"] = run_info_yaml return kwargs if __name__ == "__main__": kwargs = parse_cl_args(sys.argv[1:]) if "upgrade" in kwargs and kwargs["upgrade"]: install.upgrade_bcbio(kwargs["args"]) elif "server" in kwargs and kwargs["server"]: server_main.start(kwargs["args"]) elif "runfn" in kwargs and kwargs["runfn"]: runfn.process(kwargs["args"]) elif "graph" in kwargs and kwargs["graph"]: graph.bootstrap(kwargs["args"]) elif "version" in kwargs and kwargs["version"]: programs.write_versions({"work": kwargs["args"].workdir}) elif "sequencer" in kwargs and kwargs["sequencer"]: machine.check_and_postprocess(kwargs["args"]) else: if kwargs.get("workflow"): setup_info = workflow.setup(kwargs["workflow"], kwargs.pop("inputs")) if setup_info is None: # no automated run after setup sys.exit(0) workdir, new_kwargs = setup_info os.chdir(workdir) kwargs.update(new_kwargs)