1
2
library(tadaA)
setwd("/storage11_7T/fuy/TADA-A")
1
2
3
4
5
6
7
TADA_A_adjust_mutrate(window_file = 'db/MS_data/windows_partition/cd_windows_with_div_score.bed',
mut_file = '/storage11_7T/fuy/TADA-A/cell_WES/2220_mis_nlt1_pli_denovo.bed',
genes = "all",
sample_size = 6430,
mutrate_mode = "regular",
scaling_file_name = "cell_WES/cd_mis_pli_syn.2220DNM_6430fam_scaling_factors.txt",
scale_features = c("GC_content", "div_score"))
[1] "Made a tmp folder for tmp files."
[1] "Finished calculating mutation count within per genomic window. Time consumed: 2.734s"
[1] "Finished fitting mutation rate model and calculating scaling factors. Time consumed: 7.295s"
[1] "Removed temporary files."
A matrix: 3 × 4 of type dbl
EstimateStd. Errorz valuePr(>|z|)
(Intercept)-1.154791460.02357053-48.99302240.000000e+00
GC_content-0.201658430.02499600 -8.06762937.167628e-16
div_score 0.010388770.02326593 0.44652276.552198e-01
1
2
3
4
f = fread("/storage11_7T/fuy/TADA-A/cell_WES/cd_mis_pli_syn.7131DNM_6430fam_scaling_factors.txt")
colnames(f)[2] = "z"
f$scaling_factor = f$z * 0.36
fwrite(f[,c(1,3)],"/storage11_7T/fuy/TADA-A/cell_WES/cd_mis_pli_syn.7131DNM_6430fam_scaling_factors_x036.txt",sep="\t")
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
system.time(compact_data <- TADA_A_read_info_by_chunks(
mut_files = "/storage11_7T/fuy/TADA-A/cell_WES/cd_mis_pli_syn.7131DNM.allele.bed",

# c("db/MS_data/DNM/Jiang_cases_DNM_with_allele_info.txt",
# "db/MS_data/DNM/Kong_cases_DNM_with_allele_info.txt",
# "db/MS_data/DNM/Michaelson_cases_DNM_with_allele_info.txt",
# "db/MS_data/DNM/Yuen_NM2015_cases_DNM_with_allele_info.txt",
# "db/MS_data/DNM/Wu_cases_DNM_with_allele_info.txt"),

window_file = 'db/MS_data/windows_partition/cd_windows_with_div_score.bed',

mutrate_scaling_files = c("/storage11_7T/fuy/TADA-A/cell_WES/cd_mis_pli_syn.7131DNM_6430fam_scaling_factors_x036.txt"),

# sample_sizes = 4265,
sample_sizes = 6430,

# mutrate_scaling_files = c("db/MS_data/results/Jiang_windows_mutrate_with_div_score_scaling_file_for_test_DNM.txt",
# "db/MS_data/results/Kong_windows_mutrate_with_div_score_scaling_file_for_test_DNM.txt",
# "db/MS_data/results/Michaelson_windows_mutrate_with_div_score_scaling_file_for_test_DNM.txt",
# "db/MS_data/results/Yuen_NM2015_windows_mutrate_with_div_score_scaling_file_for_test_DNM.txt",
# "db/MS_data/results/Wu_windows_mutrate_with_div_score_scaling_file_for_test_DNM.txt"),

# sample_sizes = c(32,78,10,162,32),


gene_prior_file = "db/MS_data/prior/uniform_gene_prior.txt",

nonAS_noncoding_annotations = NA, #c(
# "/storage11_7T/fuy/TADA-A/annotation/ccr/ccrs.allchrom.gt90.bed"),
#"/storage11_7T/fuy/TADA-A/annotation/ccr/chr_ccr_gt95_syn_rm.bed"),

AS_noncoding_annotations = list(
######################### interaction #####################
# c("/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex.altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex.altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex.altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex.altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/MVP/MVP.altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MVP/MVP.altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MVP/MVP.altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MVP/MVP.altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/primateAI/primateAI.altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/primateAI/primateAI.altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/primateAI/primateAI.altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/primateAI/primateAI.altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/MPC_score/MPC2.altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MPC_score/MPC2.altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MPC_score/MPC2.altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MPC_score/MPC2.altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced5.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced5.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced5.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced5.top5%_altT.ccr90.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced6.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced6.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced6.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced6.top5%_altT.ccr90.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced7.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced7.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced7.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced7.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced8.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced8.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced8.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced8.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced9.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced9.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced9.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced9.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced10.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced10.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced10.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced10.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced11.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced11.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced11.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced11.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced12.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced12.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced12.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced12.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced13.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced13.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced13.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced13.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced14.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced14.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced14.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced14.top5%_altT.ccr90.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced15.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced15.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced15.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced15.top5%_altT.ccr90.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/A.top001.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/C.top001.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/G.top001.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/T.top001.ccr90.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.ccr90.altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.ccr90.altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.ccr90.altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.ccr90.altT.bed"),

# #c("/storage11_7T/fuy/TADA-A/annotation/ribosnitch/ribosnitch.ccr90.altA.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/ribosnitch.ccr90.altC.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/ribosnitch.ccr90.altG.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/ribosnitch.ccr90.altT.bed"),
# #
# #c("/storage11_7T/fuy/TADA-A/annotation/CLIPdb/CLIPdb.ccr90.altA.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/CLIPdb/CLIPdb.ccr90.altC.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/CLIPdb/CLIPdb.ccr90.altG.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/CLIPdb/CLIPdb.ccr90.altT.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced1.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced1.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced1.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced1.top5%_altT.ccr90.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced2.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced2.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced2.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced2.top5%_altT.ccr90.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced3.top5%_altA.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced3.top5%_altC.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced3.top5%_altG.ccr90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced3.top5%_altT.ccr90.bed"),

# #c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced4.top5%_altA.ccr90.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced4.top5%_altC.ccr90.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced4.top5%_altG.ccr90.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced/spliced4.top5%_altT.ccr90.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_A.bed.ccr.gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_C.bed.ccr.gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_G.bed.ccr.gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_T.bed.ccr.gt90.bed") ,

# # c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain12_altA.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain12_altC.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain12_altG.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain12_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altA.bed.ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altC.bed.ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altG.bed.ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altT.bed.ccr_gt90.bed"),

#c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_primateAI_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_primateAI_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_primateAI_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_primateAI_altT.bed"),

#c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain2_altA_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain2_altC_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain2_altG_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain2_altT_ccr_gt90.bed"),
#
#c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain3_altA_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain3_altC_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain3_altG_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain3_altT_ccr_gt90.bed"),
#
#c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain4_altA_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain4_altC_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain4_altG_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain4_altT_ccr_gt90.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain5_altA_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain5_altC_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain5_altG_ccr_gt90.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain5_altT_ccr_gt90.bed"),

######################## DeepSEA #######################

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain/brain1_altT.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain2_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain2_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain2_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain2_altT.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain3_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain3_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain3_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain3_altT.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain4_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain4_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain4_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain4_altT.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain5_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain5_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain5_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/brain5_altT.bed")

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced1.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced1.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced1.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced1.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced2.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced2.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced2.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced2.top5%_altT.bed") ,

# # c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced3.top5%_altA.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced3.top5%_altC.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced3.top5%_altG.bed",
# # "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced3.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced4.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced4.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced4.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced4.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced5.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced5.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced5.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced5.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced6.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced6.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced6.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced6.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced7.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced7.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced7.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced7.top5%_altT.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced8.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced8.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced8.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced8.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced9.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced9.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced9.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced9.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced10.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced10.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced10.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced10.top5%_altT.bed") ,

# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced11.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced11.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced11.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced11.top5%_altT.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced12.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced12.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced12.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced12.top5%_altT.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced13.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced13.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced13.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced13.top5%_altT.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced14.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced14.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced14.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced14.top5%_altT.bed") ,


# c("/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced15.top5%_altA.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced15.top5%_altC.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced15.top5%_altG.bed",
# "/storage11_7T/fuy/TADA-A/annotation/DeepSEA/spliced_rbp/st.true.spliced15.top5%_altT.bed") ,


####################### RADAR RBP ############################
# c("/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/A.top005.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/C.top005.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/G.top005.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RADAR_RBP/T.top005.bed")

####################### WES denovo ptv ############################
# c("/storage11_7T/fuy/TADA-A/annotation/pLI/denovo_pLI_snv_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/denovo_pLI_snv_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/denovo_pLI_snv_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/denovo_pLI_snv_alt_A.bed"),

####################### gnomad lof (PTV SNV: Nonsense, splice acceptor, and splice donor variants) ############################
# c("/storage11_7T/fuy/TADA-A/annotation/gnomad/gnomad.v2.1.1.all_lofs_snv_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/gnomad/gnomad.v2.1.1.all_lofs_snv_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/gnomad/gnomad.v2.1.1.all_lofs_snv_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/gnomad/gnomad.v2.1.1.all_lofs_snv_alt_T.bed"),

####################### gnomad PTV tiers ############################
# c("/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt09_gnomad.v2.1.1.all_lofs_snv_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt09_gnomad.v2.1.1.all_lofs_snv_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt09_gnomad.v2.1.1.all_lofs_snv_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt09_gnomad.v2.1.1.all_lofs_snv_alt_T.bed")

# c("/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_05_995_gnomad.v2.1.1.all_lofs_snv_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_05_995_gnomad.v2.1.1.all_lofs_snv_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_05_995_gnomad.v2.1.1.all_lofs_snv_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_05_995_gnomad.v2.1.1.all_lofs_snv_alt_T.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_lt05_gnomad.v2.1.1.all_lofs_snv_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_lt05_gnomad.v2.1.1.all_lofs_snv_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_lt05_gnomad.v2.1.1.all_lofs_snv_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_lt05_gnomad.v2.1.1.all_lofs_snv_alt_T.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt_995_gnomad.v2.1.1.all_lofs_snv_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt_995_gnomad.v2.1.1.all_lofs_snv_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt_995_gnomad.v2.1.1.all_lofs_snv_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/pLI/pLI_nlt_995_gnomad.v2.1.1.all_lofs_snv_alt_T.bed"),

####################### annova missense ############################
# c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_missense_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_missense_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_missense_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_missense_alt_T.bed"),

####################### annova lof ############################
# c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_T.bed"),

c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_A.nlt995.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_C.nlt995.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_G.nlt995.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_T.nlt995.bed") ,

c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_A.05-995.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_C.05-995.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_G.05-995.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_T.05-995.bed") ,

c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_A.ls05.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_C.ls05.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_G.ls05.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_lof_alt_T.ls05.bed") ,

####################### annova syn ############################
c("/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_cd_syn_alt_A.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_cd_syn_alt_C.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_cd_syn_alt_G.bed",
"/storage11_7T/fuy/TADA-A/annotation/driverMAPS/all_cd_syn_alt_T.bed"),

####################### CADD ############################
# c("/storage11_7T/fuy/TADA-A/annotation/CADD/whole_genome_SNVs_gt15_altA_within_10kb_and_promoter_no_utr.bed",
# "/storage11_7T/fuy/TADA-A/annotation/CADD/whole_genome_SNVs_gt15_altC_within_10kb_and_promoter_no_utr.bed",
# "/storage11_7T/fuy/TADA-A/annotation/CADD/whole_genome_SNVs_gt15_altG_within_10kb_and_promoter_no_utr.bed",
# "/storage11_7T/fuy/TADA-A/annotation/CADD/whole_genome_SNVs_gt15_altT_within_10kb_and_promoter_no_utr.bed"),

####################### RBP ############################
# c("/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.all.bed.merge_overlap_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altA.bed.merge_in_coding_windows.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.all.bed.merge_overlap_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altC.bed.merge_in_coding_windows.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.all.bed.merge_overlap_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altG.bed.merge_in_coding_windows.bed",
# "/storage11_7T/fuy/TADA-A/annotation/RBP-VarDB/RBP.all.bed.merge_overlap_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altT.bed.merge_in_coding_windows.bed"),

# ###################### MVP ###########################
# c("/storage11_7T/fuy/TADA-A/annotation/MVP/chr_MVP_all_rare_missense_pathogen_rank_gt_75_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MVP/chr_MVP_all_rare_missense_pathogen_rank_gt_75_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MVP/chr_MVP_all_rare_missense_pathogen_rank_gt_75_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/MVP/chr_MVP_all_rare_missense_pathogen_rank_gt_75_alt_T.bed"),

# # ############################ primateAI ################################
# c("/storage11_7T/fuy/TADA-A/annotation/primateAI/chr_primateAI_exome_mutation_pathogen_rank_gt_80_alt_A.bed",
# "/storage11_7T/fuy/TADA-A/annotation/primateAI/chr_primateAI_exome_mutation_pathogen_rank_gt_80_alt_C.bed",
# "/storage11_7T/fuy/TADA-A/annotation/primateAI/chr_primateAI_exome_mutation_pathogen_rank_gt_80_alt_G.bed",
# "/storage11_7T/fuy/TADA-A/annotation/primateAI/chr_primateAI_exome_mutation_pathogen_rank_gt_80_alt_T.bed"),

# # ########################## spidex #############################
# c("/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex_public_noncommercial_v1_0.tab_alt_A_lower10pct.bed",
# "/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex_public_noncommercial_v1_0.tab_alt_C_lower10pct.bed",
# "/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex_public_noncommercial_v1_0.tab_alt_G_lower10pct.bed",
# "/storage11_7T/fuy/TADA-A/db/MS_data/annota/spidex_public_noncommercial_v1_0.tab_alt_T_lower10pct.bed"),

# ############## MPC ##################
c("/storage11_7T/fuy/TADA-A/annotation/MPC_score/fordist_constraint_official_mpc_values_v2_MPC_gt2_altA.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/fordist_constraint_official_mpc_values_v2_MPC_gt2_altC.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/fordist_constraint_official_mpc_values_v2_MPC_gt2_altG.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/fordist_constraint_official_mpc_values_v2_MPC_gt2_altT.bed"),

c("/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC12_alt_A.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC12_alt_C.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC12_alt_G.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC12_alt_T.bed"),

c("/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC01_alt_A.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC01_alt_C.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC01_alt_G.bed",
"/storage11_7T/fuy/TADA-A/annotation/MPC_score/chr.MPC01_alt_T.bed")

#################### ribosnitch ###########################
# c("/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altA.bed.merge.bed",
# "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altC.bed.merge.bed",
# "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altG.bed.merge.bed",
# "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.1.altT.bed.merge.bed"),

# c("/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altA_in_coding_windows.bed",
# "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altC_in_coding_windows.bed",
# "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altG_in_coding_windows.bed",
# "/storage11_7T/fuy/TADA-A/annotation/ribosnitch/hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altT_in_coding_windows.bed"),

###################### CLIPdb ############################
#c("/storage11_7T/fuy/TADA-A/annotation/CLIPdb/human_combine.merged_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altA.bed",
#"/storage11_7T/fuy/TADA-A/annotation/CLIPdb/human_combine.merged_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altC.bed",
#"/storage11_7T/fuy/TADA-A/annotation/CLIPdb/human_combine.merged_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altG.bed",
#"/storage11_7T/fuy/TADA-A/annotation/CLIPdb/human_combine.merged_hg19_refGenes_exons.gtf.lg.transc.fa.RNAsnpM3.bed.abspos.p0.05.merged.altT.bed")

),

report_proportion = 18665/18665,
#chunk_partition_num =1,
chunk = 2,
node_n = 2,
mutrate_ref_files = c("db/MS_data/mutrate/Example_windows_extended_1bp_for_getting_base_level_mutrate.bed.fasta.tri.alt_A.mutrate.bw",
"db/MS_data/mutrate/Example_windows_extended_1bp_for_getting_base_level_mutrate.bed.fasta.tri.alt_C.mutrate.bw",
"db/MS_data/mutrate/Example_windows_extended_1bp_for_getting_base_level_mutrate.bed.fasta.tri.alt_G.mutrate.bw",
"db/MS_data/mutrate/Example_windows_extended_1bp_for_getting_base_level_mutrate.bed.fasta.tri.alt_T.mutrate.bw")

# mutrate_ref_files = c("/storage11_7T/data.for.yuwen/new_mutrate/window.hg19.genome.tri2.alt_A.uq.bedGraph.sort.bw" ,
# "/storage11_7T/data.for.yuwen/new_mutrate/window.hg19.genome.tri2.alt_C.uq.bedGraph.sort.bw" ,
# "/storage11_7T/data.for.yuwen/new_mutrate/window.hg19.genome.tri2.alt_G.uq.bedGraph.sort.bw" ,
# "/storage11_7T/data.for.yuwen/new_mutrate/window.hg19.genome.tri2.alt_T.uq.bedGraph.sort.bw" )


))

saveRDS(compact_data,paste0("/storage11_7T/fuy/TADA-A/cell_WES/",Sys.Date(),"_wes_7131_annovar_pli_6430fam_x036_compact.rds"))
 user   system  elapsed 
3.240    1.049 3426.169 
1
compact_data = readRDS("/storage11_7T/fuy/TADA-A/cell_WES/2020-10-31_wes_7131_annovar_pli_6430fam_x036_compact.rds")
1
2
3
4
5
6
7
8
9
10
11
s = 0
for(j in 1:length(compact_data$base_info)){

lg = length(compact_data$base_info[[j]])
for(i in 1:lg){
if(compact_data$base_info[[j]][[i]]$feature_vector[4] == 1){
s = s + compact_data$base_info[[j]][[i]]$sum_mut_rate
}
}
}
s

604.833220375029

1
2
3
605 
1680 * .36
1756 # obs

605

604.8

1756

1
2
3
4
5
6
7
RR = TADA_A_RR_estimate(data = compact_data$base_info, selected_annotations = c(seq(1,7)), 
# gene_prior_file = "db/MS_data/prior/Example_gene_prior.txt",
gene_prior_file = "db/MS_data/prior/uniform_gene_prior.txt",
optimization_iteration = 2000)

saveRDS(RR,paste0("/storage11_7T/fuy/TADA-A/cell_WES/",Sys.Date(),"_wes_7131_all_mis_pli_6430fam_x036_joint_rr.rds"))
RR
[1] "Read in gene prior file. Time consumed: 0.026s."
[1] "Finished optimization. Time consumed: 15189.986.s"


Warning message in sqrt(c(diag(fisher_info))):
“NaNs produced”


[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
$mle
$par
  1. 2.1424451734737
  2. -1.89705089343724
  3. -3.0922865905406
  4. 2.04079226776
  5. -1.53306735683585
  6. 2.27663122791734
  7. 2.21010014863059
$value
-56129.480681459
$counts
function
730
gradient
<NA>
$convergence
0
$message
NULL
$hessian
A matrix: 7 × 7 of type dbl
-42.93596976-0.0537820597 0.0794061634 0.6889604 4.08241067 -11.56590042 -22.3406114
-0.05378206 0.4779667506-0.0001891749 0.1194076-0.01000444 0.04888898 0.1729131
0.07940616-0.0001891749 1.6719968698 -0.4163940 0.02059096 0.21074811 1.2406163
0.68896043 0.1194075594-0.4163939593-251.9040117-1.07811320 -8.03102921 -16.1118987
4.08241067-0.0100044417 0.0205909600 -1.0781132 9.88774809 0.67822475 -1.0389140
-11.56590042 0.0488889782 0.2107481123 -8.0310292 0.67822475-146.64133960 -9.0523936
-22.34061139 0.1729131327 1.2406162568 -16.1118987-1.03891398 -9.05239358-601.1079640
$rr_report
A data.frame: 7 × 3
logRRlower_boundupper_bound
<dbl><dbl><dbl>
2.1424451.8432112.441680
-1.897051 NaN NaN
-3.092287 NaN NaN
2.0407921.9171272.164457
-1.533067 NaN NaN
2.2766312.1128952.440368
2.2101002.1294272.290773
1
2
3
4
5
6
7
8
l = length(compact_data$base_info)
l

s = 0
for(i in 1:l){
s = s + compact_data$base_info[[i]]$`1`$sum_mut_rate
}
s

2035

0.673927544911119

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tm = proc.time()
dfn = c()
for(i in 1:7){

RR = TADA_A_RR_estimate(data = compact_data$base_info, selected_annotations = c(i),
# gene_prior_file = "db/MS_data/prior/Example_gene_prior.txt",
gene_prior_file = "db/MS_data/prior/uniform_gene_prior.txt",
optimization_iteration = 2000)

dfn = rbind(dfn,RR$rr_report)
}
proc.time() - tm
# saveRDS(RR,paste0("/storage11_7T/fuy/TADA-A/annotation/results/",Sys.Date(),"_wes_deepsea_brain_RR.rds"))

dfn
[1] "Read in gene prior file. Time consumed: 0.003s."
[1] "Finished optimization. Time consumed: 333.734.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
[1] "Read in gene prior file. Time consumed: 0.005s."
[1] "Finished optimization. Time consumed: 279.076.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
[1] "Read in gene prior file. Time consumed: 0.005s."
[1] "Finished optimization. Time consumed: 347.618.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
[1] "Read in gene prior file. Time consumed: 0.004s."
[1] "Finished optimization. Time consumed: 277.741.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
[1] "Read in gene prior file. Time consumed: 0.005s."
[1] "Finished optimization. Time consumed: 393.818.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
[1] "Read in gene prior file. Time consumed: 0.005s."
[1] "Finished optimization. Time consumed: 289.588.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"
[1] "Read in gene prior file. Time consumed: 0.005s."
[1] "Finished optimization. Time consumed: 290.586.s"
[1] "Got confidence intervals of RR estimates."
[1] "Finished RR estimation!"



     user    system   elapsed 
13733.994    14.261  2212.212 
A data.frame: 7 × 3
relative_risklower_boundupper_bournd
<dbl><dbl><dbl>
4.0172503.7944454.240054
2.7755032.2661433.284863
2.5487042.2804672.816942
2.6153402.5026732.728007
3.2581333.0729543.443312
2.7690332.6307162.907349
2.4117902.3324882.491092
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
options(scipen=200)
tm = proc.time()
BF = TADA_A_get_BFs(data = compact_data$base_info,
selected_annotations = seq(1,7),
rr = RR$rr_report$logRR,
# additional_BF_file = c("/storage11_7T/fuy/TADA-A/annotation/cd_BF/Example_gene_coding_BF.txt"),
additional_BF_file = c("/storage11_7T/fuy/TADA-A/annotation/cd_BF/uniform_cd_BFs.txt"),
TADA_p0 = 0.94)

g_BF = BF$gene_BF_table
g_BF = g_BF[order(g_BF$FDR_all),]
g_BF2 = g_BF[g_BF$FDR_all <= 0.1,]
proc.time() - tm
nrow(g_BF2)

g_BF2
[1] "Read in additional BF file /storage11_7T/fuy/TADA-A/annotation/cd_BF/uniform_cd_BFs.txt."
[1] "Flagged genes that don't have any bases with any informative annotation."
[1] "Got genenames without bases that have informative rr features."
[1] "Got logBF_noncoding."
[1] "Added coding and non-coding logBF. Time consumed: 2.427s."
[1] "Finished!"



   user  system elapsed 
 10.832   0.008  10.073 

180

A data.table: 180 × 9
genenamelogBF_noncodinglogBF_codinglogBF_allBF_noncodingBF_codingBF_allFDR_codingFDR_all
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
DYNC1H111.720837011.720837123110.43881123110.43880.940.0001272408
ANK2 10.750745010.750745 46664.76551 46664.76550.940.0002314281
ARID1B 10.690188010.690188 43922.76001 43922.76000.940.0002731386
FBN1 9.5970380 9.597038 14721.10731 14721.10730.940.0004706290
MUC2 9.3336720 9.333672 11312.59201 11312.59200.940.0006530976
SETD5 8.5784130 8.578413 5315.66131 5315.66130.940.0010340155
NAV2 8.5215900 8.521590 5022.03391 5022.03390.940.0013305682
SASH1 8.5213580 8.521358 5020.86961 5020.86960.940.0015530726
CACNA1E 8.3111350 8.311135 4068.92961 4068.92960.940.0018066810
MYH9 8.2040690 8.204069 3655.79511 3655.79510.940.0020527276
BCL9L 8.1868040 8.186804 3593.21991 3593.21990.940.0022607647
SCN1A 8.1078570 8.107857 3320.45481 3320.45480.940.0024637070
BRD4 8.0516240 8.051624 3138.88991 3138.88990.940.0026562188
KCNMA1 7.9750310 7.975031 2907.44681 2907.44680.940.0028493162
PXDNL 7.9361930 7.936193 2796.69211 2796.69210.940.0030307385
GRN 7.8843290 7.884329 2655.34211 2655.34210.940.0032079079
PTPRM 7.7512110 7.751211 2324.38551 2324.38550.940.0034130314
SNTG1 7.7252310 7.725231 2264.77541 2264.77540.940.0036050859
PRKCA 7.7113890 7.711389 2233.64251 2233.64250.940.0037819289
SRCAP 7.5894540 7.589454 1977.23441 1977.23440.940.0039858942
PKD2L1 7.5871320 7.587132 1972.64761 1972.64760.940.0041712979
GNS 7.4825710 7.482571 1776.80321 1776.80320.940.0043789784
MYO7B 7.1712140 7.171214 1301.42411 1301.42410.940.0047057577
PTGFRN 7.1002400 7.100240 1212.25751 1212.25750.940.0050412953
GRIK5 7.0822160 7.082216 1190.60451 1190.60450.940.0053591508
UNC45B 7.0640080 7.064008 1169.12191 1169.12190.940.0056616132
FOXK2 7.0000980 7.000098 1096.74081 1096.74080.940.0059735375
TECTA 6.9647410 6.964741 1058.64081 1058.64080.940.0062810196
RELN 6.8667970 6.866797 959.86951 959.86950.940.0066182101
PTPRF 6.8578950 6.857895 951.36201 951.36200.940.0069376308
TRRAP 4.21003204.21003267.35872167.358720.940.07921092
ADCY2 4.20792704.20792767.21706167.217060.940.07993334
CIT 4.20325704.20325766.90390166.903900.940.08065101
NID2 4.19838704.19838766.57885166.578850.940.08136423
AGAP2 4.18269304.18269365.54212165.542120.940.08208394
TRIO 4.16915504.16915564.66080164.660800.940.08280798
NBEAL2 4.16559704.16559764.43114164.431140.940.08352636
ZNF423 4.16080304.16080364.12297164.122970.940.08424044
AP1B1 4.15869804.15869863.98818163.988180.940.08494761
PSPN 4.14823404.14823463.32205163.322050.940.08565632
C1orf53 4.13355304.13355362.39926162.399260.940.08637078
THAP2 4.12945404.12945462.14396162.143960.940.08708049
PTGES 4.10581604.10581660.69223160.692230.940.08780498
TEX33 4.09916004.09916060.28961160.289610.940.08852726
AKIRIN2 4.09821104.09821160.23245160.232450.940.08924173
PTPRN2 4.09402404.09402459.98079159.980790.940.08995172
PRR23C 4.08961404.08961459.71684159.716840.940.09065756
DLX4 4.08085004.08085059.19576159.195760.940.09136360
CA3 4.06042304.06042357.99884157.998840.940.09208141
ELSPBP1 4.05667804.05667857.78203157.782030.940.09279446
GNRHR 4.05201204.05201257.51308157.513080.940.09350376
DCDC2B 4.04068104.04068156.86508156.865080.940.09421593
LIX1 4.03662804.03662856.63503156.635030.940.09492385
TET2 4.02432604.02432655.94258155.942580.940.09563566
CUL7 4.01394904.01394955.36506155.365060.940.09634951
FCAR 4.01174704.01174755.24332155.243320.940.09705739
HIST1H4E4.00973504.00973555.13226155.132260.940.09775924
KRTAP1-14.00772904.00772955.02175155.021750.940.09845514
SLC35C2 4.00717804.00717854.99147154.991470.940.09914380
OAF 4.00427704.00427754.83218154.832180.940.09982759