-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
51 lines (45 loc) · 1009 Bytes
/
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
##
## Workflow to Generate Controlled Vocabulary from C2M2
##
rule all:
message:
f"Generate Controlled Vocabulary from C2M2"
input:
"table_no_zero.csv",
"table.csv",
"usage.json",
"c2m2_cv_usage.py"
rule run_C2M2_script:
message:
"Running C2M2 script"
output:
"usage.json"
shell: """
# run the C2M2 script
python c2m2_cv_usage.py -o {output}
"""
rule run_formatting_script:
message:
"Running formatting script"
input:
"usage.json"
output:
"table.csv"
shell: """
# run reformatting script to make csv
python display.py {input} -o {output}
python remove_zeros.py
cat table_no_zero.csv
"""
rule remove_zeros:
message:
"Removing zeros"
output:
"table_no_zero.csv"
input:
"table.csv"
shell: """
python remove_zeros.py
head {output}
tail {output}
"""