-
Notifications
You must be signed in to change notification settings - Fork 0
/
benchmarking.snakefile
172 lines (160 loc) · 4.73 KB
/
benchmarking.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
sra_search_bin="/home/ctbrown/scratch/magsearch/bin/searcher"
rule all:
input:
expand("benchmarks/{x}_vs_{y}.txt", x=['a'],
y=['a', 'b', 'c', 'd', 'e']),
"outputs/output_a_vs_largest_10k.csv",
expand("benchmarks/a_{n}_vs_a.txt", n=range(100, 1000, 100)),
expand("benchmarks/a_vs_a_{n}.txt", n=range(1000, 10000, 1000)),
expand("benchmarks/a_vs_a_1000_t{t}.txt", t=[4,8,16]),
expand("benchmarks/a_vs_catalog.txt"),
rule a_vs_a:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-a.txt",
output:
csv="outputs/output_a_vs_a.csv",
benchmark:
"benchmarks/a_vs_a.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_sub_vs_a:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a-{n}.sigs.txt",
against="data/wort-list-a.txt",
output:
csv="outputs/output_a_{n}_vs_a.csv",
benchmark:
"benchmarks/a_{n}_vs_a.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_a_sub:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-a-{n}.txt",
output:
csv="outputs/output_a_vs_a_{n}.csv",
benchmark:
"benchmarks/a_vs_a_{n}.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_b:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-b.txt",
output:
csv="outputs/output_a_vs_b.csv",
benchmark:
"benchmarks/a_vs_b.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_c:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-c.txt",
output:
csv="outputs/output_a_vs_c.csv",
benchmark:
"benchmarks/a_vs_c.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_d:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-d.txt",
output:
csv="outputs/output_a_vs_d.csv",
benchmark:
"benchmarks/a_vs_d.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_e:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-e.txt",
output:
csv="outputs/output_a_vs_e.csv",
benchmark:
"benchmarks/a_vs_e.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_largest:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-largest-10k.txt",
output:
csv="outputs/output_a_vs_largest_10k.csv",
benchmark:
"benchmarks/a_vs_largest_10k.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_a_sub_threads:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/wort-list-a-{n}.txt",
output:
csv="outputs/output_a_vs_a_{n}_t{thr}.csv",
benchmark:
"benchmarks/a_vs_a_{n}_t{thr}.txt"
threads: 64
shell: """
export RAYON_NUM_THREADS={wildcards.thr}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against}
"""
rule a_vs_catalog:
input:
bin=sra_search_bin,
queries="data/gtdb-list-a.sigs.txt",
against="data/metagenomes-catalog.txt",
output:
csv="outputs/output_a_vs_catalog.csv",
benchmark:
"benchmarks/a_vs_catalog.txt"
threads: 32
shell: """
export RAYON_NUM_THREADS={threads}
{input.bin} -k 31 --scaled=1000 -o {output.csv} \
{input.queries} {input.against} || true
"""