-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsimulated_tests.sh
More file actions
executable file
·280 lines (267 loc) · 10.9 KB
/
Copy pathsimulated_tests.sh
File metadata and controls
executable file
·280 lines (267 loc) · 10.9 KB
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#!/bin/bash
last_job_id=""
function slurm {
filename=$1
job_name=$2
mem=$3
tim=$4
command=$5
thread_count=$6
dependencies=$7
echo "#!/bin/bash" > $filename
echo "#SBATCH --job-name=$job_name" >> $filename
echo "#SBATCH -c $thread_count" >> $filename
echo "#SBATCH --mem $mem" >> $filename
echo "#SBATCH -t $tim" >> $filename
echo "#SBATCH --output=$filename.out" >> $filename
echo "#SBATCH --error=$filename.err" >> $filename
echo "#SBATCH --export=all" >> $filename
echo "#SBATCH -p debug,express,normal,big-mem,long" >> $filename
if [ $dependencies != "NONE" ]
then
echo "#SBATCH --dependency=afterany$dependencies" >> $filename
fi
echo -e "touch $filename.no_success" >> $filename
echo -e "$command" >> $filename
echo -e "rm $filename.no_success" >> $filename
last_job_id=$(sbatch $filename)
}
random_seed=42
barcode_length=8
molecule_size_mu=300
read_length=150
sequencing_machine=HS25
./benchmark annotation reference reference_name=hg38 gnu_time cdhitest starcode rainbow dunovo umitools bwa reference_bwa_index
make
./benchmark panel reference_name=hg38 gene_list_name=COSMIC_cancer_genes random_seed=$random_seed
for dataset in $@
do
case $dataset in
"small") echo "Test dataset one"
num_barcodes=100
num_molecules=100000
;;
"medium") echo "Test dataset two"
num_barcodes=5000
num_molecules=1000000
;;
"large") echo "Test dataset three"
num_barcodes=25000
num_molecules=1000000
;;
"giant") echo "Test dataset four"
num_barcodes=25000
num_molecules=2000000
;;
"tiny") echo "Test dataset five"
num_barcodes=100
num_molecules=25
;;
esac
slurm_path=slurm_pbs/"$dataset"
mkdir -p "$slurm_path"
# Making barcodes
barcodes_deps=""
job_name="barcodes"
filename="$slurm_path/$job_name.pbs"
mem="10240"
tim="00:29:59"
command="./benchmark barcodes "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"random_seed=$random_seed "
depends="NONE"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
barcodes_deps=$barcodes_deps":"${last_job_id##* }
# Making molecules
molecules_deps=""
job_name="molecules"
filename="$slurm_path/$job_name.pbs"
mem="51200"
tim="02:59:59"
command="./benchmark molecules "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
depends="$barcodes_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
molecules_deps=$molecules_deps":"${last_job_id##* }
# Making simulation and log files
simulate_deps=""
job_name="simulate"
filename="$slurm_path/$job_name.pbs"
mem="51200"
tim="05:59:59"
command="./benchmark simulate log_files "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
depends="$barcodes_deps""$molecules_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
simulate_deps=$simulate_deps":"${last_job_id##* }
# calib_log
job_name="calib"
filename="$slurm_path/$job_name.pbs"
mem="102400"
tim="02:59:59"
command="./benchmark calib_log "
command=$command"log_comment=$dataset "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
depends="$simulate_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
# umitools_log
job_name="umitools"
filename="$slurm_path/$job_name.pbs"
mem="102400"
tim="23:59:59"
command="./benchmark umitools_log "
command=$command"log_comment=$dataset "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
depends="$simulate_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "32" "$depends"
# cd-hit-est
for cdhitest_dist in 0.80 0.85 0.90 0.95 0.96 0.97 0.98
do
job_name="cdhitest_"$cdhitest_dist""
filename="$slurm_path/$job_name.pbs"
mem="25000"
tim="23:59:59"
command="./benchmark cdhitest_log "
command=$command"log_comment=$dataset "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
command=$command"cdhitest_dist=$cdhitest_dist "
depends="$simulate_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
done
# rainbow_log
for rainbow_mismatch in 1 2 3 4 5 6 7 8 9
do
for rainbow_div in "true" "false"
do
# rainbow_log
job_name="rainbow_"$rainbow_mismatch"_"$rainbow_div""
filename="$slurm_path/$job_name.pbs"
mem="51200"
tim="00:59:59"
command="./benchmark rainbow_log "
command=$command"log_comment=$dataset "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
command=$command"rainbow_mismatch=$rainbow_mismatch "
command=$command"rainbow_div=$rainbow_div "
depends="$simulate_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
done
done
# starcode_log
for starcode_seq_trim in 50 75 100
do
for starcode_umi_dist in 0 1 2
do
for starcode_umi_ratio in 3 1 5
do
for starcode_seq_dist in 3 5 8
do
for starcode_seq_ratio in 1 3 5
do
job_name="starcode_"$starcode_umi_dist"_"$starcode_umi_ratio"_"$starcode_seq_dist"_"$starcode_seq_ratio"_"$starcode_seq_trim""
filename="$slurm_path/$job_name.pbs"
case $starcode_seq_trim in
50)
mem="51200"
tim="23:59:59"
;;
75)
mem="102400"
tim="23:59:59"
;;
100)
mem="204800"
tim="23:59:59"
;;
esac
command="./benchmark starcode_log "
command=$command"log_comment=$dataset "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
command=$command"starcode_seq_trim=$starcode_seq_trim "
command=$command"starcode_umi_dist=$starcode_umi_dist "
command=$command"starcode_umi_ratio=$starcode_umi_ratio "
command=$command"starcode_seq_dist=$starcode_seq_dist "
command=$command"starcode_seq_ratio=$starcode_seq_ratio "
depends="$simulate_deps"
slurm "$filename" "$job_name" "$mem" "$tim" "$command" "1" "$depends"
done
done
done
done
done
# du novo
for dunovo_dist in 1 2 3 4
do
job_name="dunovo_"$dunovo_dist""
filename="$slurm_path/$job_name.sh"
command="./benchmark dunovo_log "
command=$command"log_comment=$dataset "
command=$command"random_seed=$random_seed "
command=$command"reference_name=hg38 "
command=$command"gene_list_name=COSMIC_cancer_genes "
command=$command"num_molecules=$num_molecules "
command=$command"num_barcodes=$num_barcodes "
command=$command"barcode_length=$barcode_length "
command=$command"molecule_size_mu=$molecule_size_mu "
command=$command"read_length=$read_length "
command=$command"sequencing_machine=$sequencing_machine "
command=$command"dunovo_dist=$dunovo_dist "
depends="$simulate_deps"
echo -e "$command" > $filename
done
done
exit