-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
53 lines (41 loc) · 1.23 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
45
46
47
48
49
50
51
52
53
configfile: "config/config.yaml"
include: "rules/common.smk"
include: "rules/mppnccombine.smk"
def combine_and_coarsen_restart_inputs():
inputs = []
for run in RUNS:
output = rules.coarsen_restarts_run_timestamp.output
timestamps = COARSE_RESTART_TIMESTAMPS[run]
restarts = expand(output, run=run, timestamp=timestamps)
inputs.extend(restarts)
return inputs
def combine_and_coarsen_diagnostics_inputs():
inputs = []
for run in RUNS:
output = rules.combine_and_coarsen_tape.output
tapes = TAPES[run]
diagnostics = expand(output, run=run, tape=tapes)
inputs.extend(diagnostics)
return inputs
rule combine_and_coarsen_restarts:
input:
combine_and_coarsen_restart_inputs()
rule combine_and_coarsen_diagnostics:
input:
combine_and_coarsen_diagnostics_inputs()
rule transfer:
input:
rules.combine_and_coarsen_restarts.input,
rules.combine_and_coarsen_diagnostics.input
output:
transfer_sentinel()
params:
source=transfer_source(),
gcs_path=transfer_gcs_path()
shell:
"""
gsutil -m cp -n -r {params.source} {params.gcs_path}
"""
rule all:
input:
rules.transfer.output