-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
117 lines (99 loc) · 4.02 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#ruleorder: pre_consensus_2>pre_consensus_3>pre_consensus_4>pre_consensus_5
if config['number'] == 'five':
rule plot_consensus_5:
input:
"{file1}_{file2}_{file3}_{file4}_{file5}_consensus_mol_names.csv"
output:
"{file1}_{file2}_{file3}_{file4}_{file5}_docking_consensus_plot.png"
shell:
"python plot_consensus.py {input}"
rule consensus_5:
input:
"{file1}_{file2}_{file3}_{file4}_{file5}.csv"
output:
"{file1}_{file2}_{file3}_{file4}_{file5}_consensus_mol_names.csv"
shell:
"python consensus_typing.py -f1 {wildcards.file1}_{wildcards.file2}.csv -f2 {wildcards.file1}_{wildcards.file3}.csv -f3 {wildcards.file3}_{wildcards.file2}.csv -f4 {wildcards.file1}_{wildcards.file4}.csv -f5 {wildcards.file3}_{wildcards.file4}.csv -f6 {wildcards.file2}_{wildcards.file4}.csv -f7 {wildcards.file1}_{wildcards.file5}.csv -f8 {wildcards.file5}_{wildcards.file3} -f9 {wildcards.file5}_{wildcards.file2}.csv -f10 {wildcards.file5}_{wildcards.file4}.csv -cons 3 -rmsd 2.0"
rule pre_consensus_5:
input:
"{file1}",
"{file2}",
"{file3}",
"{file4}",
"{file5}"
output:
"{file1}_{file2}_{file3}_{file4}_{file5}.csv"
shell:
"set +o pipefail;bash consensus_script.sh {input}"
elif config['number'] == 'four':
rule plot_consensus_4:
input:
"{file1}_{file2}_{file3}_{file4}_consensus_mol_names.csv"
output:
"{file1}_{file2}_{file3}_{file4}_docking_consensus_plot.png"
shell:
"python plot_consensus.py {input}"
rule consensus_4:
input:
"{file1}_{file2}_{file3}_{file4}.csv"
output:
"{file1}_{file2}_{file3}_{file4}_consensus_mol_names.csv"
shell:
"python consensus_typing.py -f1 {wildcards.file1}_{wildcards.file2}.csv -f2 {wildcards.file1}_{wildcards.file3}.csv -f3 {wildcards.file3}_{wildcards.file2}.csv -f4 {wildcards.file1}_{wildcards.file4}.csv -f5 {wildcards.file3}_{wildcards.file4}.csv -f6 {wildcards.file2}_{wildcards.file4}.csv -cons 3 -rmsd 2.0"
rule pre_consensus_4:
input:
"{file1}",
"{file2}",
"{file3}",
"{file4}"
output:
"{file1}_{file2}_{file3}_{file4}.csv"
shell:
"set +o pipefail;bash consensus_script.sh {input}"
elif config['number'] == 'three':
rule plot_consensus_3:
input:
"{file1}_{file2}_{file3}_consensus_mol_names.csv"
output:
"{file1}_{file2}_{file3}_docking_consensus_plot.png"
shell:
"python plot_consensus.py {input}"
rule consensus_3:
input:
"{file1}_{file2}_{file3}.csv"
output:
"{file1}_{file2}_{file3}_consensus_mol_names.csv"
shell:
"python consensus_typing.py -f1 {wildcards.file1}_{wildcards.file2}.csv -f2 {wildcards.file1}_{wildcards.file3}.csv -f3 {wildcards.file3}_{wildcards.file2}.csv -cons 3 -rmsd 2.0"
rule pre_consensus_3:
input:
"{file1}",
"{file2}",
"{file3}"
output:
"{file1}_{file2}_{file3}.csv"
shell:
"set +o pipefail;bash consensus_script.sh {input}"
elif config['number'] == 'two':
rule plot_consensus_2:
input:
"{file1}_{file2}_consensus_mol_names.csv"
output:
"{file1}_{file2}_docking_consensus_plot.png"
shell:
"python plot_consensus.py {input}"
rule consensus_2:
input:
"{file1}_{file2}.csv"
output:
"{file1}_{file2}_consensus_mol_names.csv"
shell:
"python consensus_typing.py -f1 {input} -cons config['way'] -rmsd 2.0"
rule pre_consensus_2:
input:
"{file1}",
"{file2}",
output:
"{file1}_{file2}.csv"
shell:
"set +o pipefail;bash consensus_script.sh {input}"