-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathSnakefile
35 lines (33 loc) · 1.3 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
# 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/worldpopulation-snakemake
# $ source ~/.virtualenvs/worldpopulation-snakemake/bin/activate
# $ pip install snakemake papermill ipykernel pandas matplotlib
# $ cp -a ../code ../data .
# $ snakemake -s ../workflow/snakemake/Snakefile \
# --configfile ../workflow/snakemake/inputs.yaml
# --config notebook=code/worldpopulation.ipynb -p --cores 1
# $ open results/plot.png
rule all:
input:
config["notebook"],
config["output_file"]
rule worldpopulation:
input:
notebook=config["notebook"],
input_file=config["input_file"]
params:
region=config["region"],
year_max=config["year_max"],
year_min=config["year_min"]
output:
output_file=config["output_file"]
container:
"docker://docker.io/reanahub/reana-env-jupyter:2.0.0"
shell:
"mkdir -p results && papermill {input.notebook} /dev/null -p "
"input_file {input.input_file} -p output_file {output.output_file} "
"-p region {params.region} -p year_min {params.year_min} -p year_max {params.year_max}"