Skip to content
Snippets Groups Projects
Commit d4682c47 authored by Jeffrey Pullin's avatar Jeffrey Pullin
Browse files

Update Snakefile to work from cluster

parent 1a88fe8e
No related branches found
No related tags found
No related merge requests found
Pipeline #5966 passed
......@@ -19,8 +19,9 @@ configfile: "config.yaml"
R = config["R"]
# Setup the required simulation and method parameters.
shell("Rscript code/simulation-pars.R")
shell("Rscript code/method-pars.R")
# /dev/null is used to suppress the log files.
shell("{R} CMD BATCH code/simulation-pars.R /dev/null")
shell("{R} CMD BATCH code/method-pars.R /dev/null")
# Retrieve the simulations and method paramters from file.
sim_ids = json.loads(open(config["sim_ids_path"]).read())
......@@ -51,6 +52,7 @@ rule run_method:
fun = lambda wc: config["code_folder"] + "run-" + wc.method_id.split('_')[0] + ".R"
output: res = config["results_folder"] + "{sim_id}-{method_id}.rds"
log: config["logs_folder"] + "run_method-{sim_id}-{method_id}.Rout"
resources: mem_mb=lambda wildcards, attempt: attempt * 2000
shell: '''{R} CMD BATCH --no-restore --no-save\
"--args sim={input.sim} fun={input.fun}\
meth_pars={input.method_pars} res={output.res}"\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment