-
Notifications
You must be signed in to change notification settings - Fork 35
/
Snakefile
44 lines (41 loc) · 1.31 KB
/
Snakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Note that if you are working on the analysis development locally, i.e. outside
# of the REANA platform, you can proceed as follows:
#
# $ mkdir snakemake-local-run
# $ cd snakemake-local-run
# $ virtualenv ~/.virtualenvs/root6-roofit-snakemake
# $ source ~/.virtualenvs/root6-roofit-snakemake/bin/activate
# $ pip install snakemake
# $ cp -a ../code .
# $ snakemake -s ../workflow/snakemake/Snakefile \
# --configfile ../workflow/snakemake/inputs.yaml -p --cores 1
# $ open results/plot.png
rule all:
input:
"results/data.root",
"results/plot.png"
rule gendata:
input:
gendata_tool=config["gendata"]
output:
"results/data.root"
params:
events=config["events"]
container:
"docker://docker.io/reanahub/reana-env-root6:6.18.04"
resources:
kubernetes_memory_limit="256Mi"
shell:
"mkdir -p results && root -b -q '{input.gendata_tool}({params.events},\"{output}\")'"
rule fitdata:
input:
fitdata_tool=config["fitdata"],
data="results/data.root"
output:
"results/plot.png"
container:
"docker://docker.io/reanahub/reana-env-root6:6.18.04"
resources:
kubernetes_memory_limit="256Mi"
shell:
"root -b -q '{input.fitdata_tool}(\"{input.data}\",\"{output}\")'"