-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
53 lines (45 loc) · 1.83 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
from os.path import join as j
from glob import glob
configfile: "workflow/config.yaml"
###############################################################################
# FOLDERS
###############################################################################
INPUT_DIR = config["input_dir"]
OUTPUT_DIR = config["output_dir"]
###############################################################################
# PROCESSED DATA FILES
###############################################################################
#NETWORK_FILE = j(OUTPUT_DIR, "monthly_network_{month}.gml")
PPR_FILE = j(OUTPUT_DIR, "Ethereum_PPR/PPR_network{month}_{type}.csv")
SYNC_FILE = j(OUTPUT_DIR, "Ethereum_SYNC/SYNC_network{month}_{type}.csv")
###############################################################################
# CONFIGURATION
###############################################################################
MONTHS = ['3','4','5','6','7','8','9','10','11','12','13','14','15','16']
TYPES_OF_NODE = ["genesis", "miner", "random"]
rule all:
input:
# expand(NETWORK_FILE, month=MONTHS)
expand(PPR_FILE, type=TYPES_OF_NODE, month=MONTHS),
expand(SYNC_FILE, type=TYPES_OF_NODE, month=MONTHS)
#rule monthly_network:
# input:
# INPUT_DIR
# output:
# NETWORK_FILE
# shell:
# "python workflow/monthly_network.py --input {input} --month {wildcards.month} --output {output}"
rule calculate_PPR:
input:
INPUT_DIR
output:
PPR_FILE
shell:
"python workflow/CalculatePPR.py --input {input} --type {wildcards.type} --month {wildcards.month} --output {output}"
rule calculate_synchronization:
input:
ppr = PPR_FILE
output:
SYNC_FILE
shell:
"python workflow/CalculateSync.py --input {input.ppr} --type {wildcards.type} --month {wildcards.month} --output {output}"