forked from birtwistlelab/Mechanistic_Pan-Cancer_Model
-
Notifications
You must be signed in to change notification settings - Fork 1
/
PARCDL_compartments.py
995 lines (850 loc) · 22.2 KB
/
PARCDL_compartments.py
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
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
import numpy as np
#import sys
def PARCDL_compartments(flagOUT,Vc,Ve,Vm,Vn,S_d):
# returns [Vx,Vv,VxTL]
numberofgenes=141;
if flagOUT[2]:
# VxTL
VxTL = np.zeros(shape=(numberofgenes))
VxTL[0:numberofgenes]=Vc;
VxTL[0:30]=Vn;
VxTL[47:49]=Vm;
VxTL[96:100]=Vn;
VxTL[136:139]=Vn;
if flagOUT[0]:
# VxRibosome
VxRibosome=Vc;
# VxD
VxD = np.zeros(shape=(38))
VxD[0:38]=Vn;
# VxC
VxC = np.zeros(shape=(44))
VxC[0:44]=Vn;
VxA = np.zeros(shape=(72))
# VxA
# reason indices are written weird is cuz i did a search and replace to add -1 to all of them (cuz of weird matlab 1 base indexing)
VxA[1-1]=Ve;#L
VxA[2-1]=Vc;#R
VxA[3-1]=Vc;#L_R
VxA[4-1]=Vc;#Ractive
VxA[5-1]=Vc;#flip
VxA[6-1]=Vc;#Ractive_flip
VxA[7-1]=Vc;#pC8
VxA[8-1]=Vc;#Ractive_pC8
VxA[9-1]=Vc;#C8
VxA[10-1]=Vc;#Bar
VxA[11-1]=Vc;#C8_Bar
VxA[12-1]=Vc;#pC3
VxA[13-1]=Vc;#C8_pC3
VxA[14-1]=Vc;#C3
VxA[15-1]=Vc;#pC6
VxA[16-1]=Vc;#C3_pC6
VxA[17-1]=Vc;#C6
VxA[18-1]=Vc;#C6_C8
VxA[19-1]=Vc;#XIAP
VxA[20-1]=Vc;#C3_XIAP
VxA[21-1]=Vc;#PARP
VxA[22-1]=Vc;#C3_PARP
VxA[23-1]=Vc;#cPARP
VxA[24-1]=Vc;#Bid
VxA[25-1]=Vc;#C8_Bid
VxA[26-1]=Vc;#tBid
VxA[27-1]=Vc;#Bcl2c
VxA[28-1]=Vc;#tBid_Bcl2c
VxA[29-1]=Vc;#Bax
VxA[30-1]=Vc;#tBid_Bax
VxA[31-1]=Vc;#Baxactive
VxA[32-1]=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
VxP[102-1]=Vc;#PIP3_PTEN
VxP[103-1]=Vc;#PIP3_AKT_PIP3_PDK1
VxP[104-1]=Vc;#PIP3_pAKT_mTORC2
VxP[105-1]=Vc;#GSK3b_ppAKT
VxP[106-1]=Vc;#bCATENIN_GSK3b
VxP[107-1]=Vc;#TSC2_ppAKT
VxP[108-1]=Vc;#TSC2_ppERK
VxP[109-1]=Vc;#RhebT_TSC
VxP[110-1]=Vc;#EIF4EBP1_mTORC1active
VxP[111-1]=Vc;#S6K_mTORC1active
VxP[112-1]=Vc;#FOXO_ppAKT
VxP[113-1]=Vc;#PI3K1_mTORC1active
VxP[114-1]=Vc;#pERK_MKP3
VxP[115-1]=Vc;#ppERK_MKP3
VxP[116-1]=Vc;#ppERKnuc_pMKP1
VxP[117-1]=Vc;#RasT_BRaf
VxP[118-1]=Vc;#RasT_BRaf_BRaf
VxP[119-1]=Vc;# MEK_RasT_BRaf_BRaf
VxP[120-1]=Vc;# pMEK_RasT_BRaf_BRaf
VxP[121-1]=Vc;#EIF4E
VxP[122-1]=Vc;#EIF4E_EIF4EBP1
VxP[123-1]=Vc;
VxP[124-1]=Vc;
VxP[125-1]=Vc;
VxP[126-1]=Vn;#FOXOnuc
VxP[127-1:130]=Vc;
# %% VxE
VxE = np.zeros(shape=(2))
VxE[0]=Vc;
VxE[1]=Vc;
# Vx
# Vx=[VxRibosome;VxD';VxC';VxA';VxR';VxRP';VxP';VxE'];
to_transpose = [VxD,VxC,VxA,VxR,VxRP,VxP,VxE]
Vx = np.array([])
Vx = np.append(Vx,VxRibosome)
for item in to_transpose:
Vx = np.append(Vx,item)
Vx = np.matrix(Vx)
Vx = np.matrix.transpose(Vx)
if flagOUT[1]:
# VvR
VvbR=Vc;
VvdR=Vc;
# VvTL
VvTL = np.zeros(shape=(numberofgenes))
VvTL[0:numberofgenes]=Vc;
# VvTLCd
VvTLCd = np.zeros(shape=(102))
VvTLCd[0:102]=Vc;
VvTLCd[0:26]=Vn;
VvTLCd[[38,39]]=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-1]=Vm;
VvA[42-1]=Vm;
VvA[43-1]=Vm;
VvA[44-1]=Vm;
VvA[45-1]=Vm;
VvA[46-1]=Vm;
VvA[47-1]=Vm;
VvA[48-1]=Vm;
VvA[49-1]=Vm;
VvA[50-1]=Vm;
VvA[51-1]=Vm;
VvA[52-1]=Vm;
VvA[53-1]=Vm;
VvA[54-1]=Vm;
VvA[55-1]=Vm;
VvA[56-1]=Vc;
VvA[57-1]=Vc;
VvA[58-1]=Vc;
VvA[59-1]=Vc;
VvA[60-1]=Vc;
VvA[61-1]=Vc;
VvA[62-1]=Vc;
VvA[63-1]=Vc;
VvA[64-1]=Vc;
VvA[65-1]=Vm;
VvA[66-1]=Vc;
VvA[67-1]=Vc;
VvA[68-1]=Vc;
VvA[69-1]=Vc;
VvA[70-1]=Vc;
VvA[71-1]=Vc;
VvA[72-1]=Vc;
VvA[73-1]=Vc;
VvA[74-1]=Vc;
VvA[75-1]=Vc;
VvA[76-1]=Vc;
VvA[77-1]=Vc;
VvA[78-1]=Vc;
VvA[79-1]=Vc;
VvA[80-1]=Vc;
VvA[81-1]=Vc;
VvA[82-1]=Vm;
VvA[83-1]=Vm;
VvA[84-1]=Vm;
VvA[85-1]=Vc;
VvA[86-1]=Vm;
VvA[87-1]=Vc;
# VvR **
VvR = np.zeros(shape=(158))
VvR[0:158]=Vc;
VvR[[1-1,7-1,13-1,21-1,25-1,31-1,35-1,43-1,47-1,53-1,57-1,63-1,73-1,77-1,81-1,87-1,92-1,123-1,125-1,127-1,129-1,131-1,133-1,135-1,137-1,139-1,141-1,151-1,153-1,155-1,157-1]]=Ve;
# looks weird because used search and replace to subtract 1 to fix matlab indices
# VvRP **
td=29
VvRP1 = np.zeros(shape=(td))
VvRP1[0:td]=Vc;
VvRP2 = np.zeros(shape=(td))
VvRP2[0:td]=Vc;
VvRP3 = np.zeros(shape=(td))
VvRP3[0:td]=Vc;
VvRP4 = np.zeros(shape=(td))
VvRP4[0:td]=Vc;
VvRP5 = np.zeros(shape=(td))
VvRP5[0:td]=Vc;
VvRP6 = np.zeros(shape=(td))
VvRP6[0:td]=Vc;
VvRP7 = np.zeros(shape=(td))
VvRP7[0:td]=Vc;
VvRP8 = np.zeros(shape=(td))
VvRP8[0:td]=Vc;
VvRP9 = np.zeros(shape=(td))
VvRP9[0:td]=Vc;
VvRP10 = np.zeros(shape=(td))
VvRP10[0:td]=Vc;
VvRP11 = np.zeros(shape=(td))
VvRP11[0:td]=Vc;
VvRP12 = np.zeros(shape=(td))
VvRP12[0:td]=Vc;
VvRP13 = np.zeros(shape=(td))
VvRP13[0:td]=Vc;
VvRP14 = np.zeros(shape=(td))
VvRP14[0:td]=Vc;
VvRP15 = np.zeros(shape=(td))
VvRP15[0:td]=Vc;
VvRP16 = np.zeros(shape=(td))
VvRP16[0:td]=Vc;
VvRP17 = np.zeros(shape=(td))
VvRP17[0:td]=Vc;
VvRP18 = np.zeros(shape=(td))
VvRP18[0:td]=Vc;
VvRP19 = np.zeros(shape=(td))
VvRP19[0:td]=Vc;
VvRP20 = np.zeros(shape=(td))
VvRP20[0:td]=Vc;
VvRP21 = np.zeros(shape=(td))
VvRP21[0:td]=Vc;
VvRP22 = np.zeros(shape=(td))
VvRP22[0:td]=Vc;
VvRP23 = np.zeros(shape=(td))
VvRP23[0:td]=Vc;
VvRP24 = np.zeros(shape=(td))
VvRP24[0:td]=Vc;
VvRP25 = np.zeros(shape=(td))
VvRP25[0:td]=Vc;
VvRP26 = np.zeros(shape=(td))
VvRP26[0:td]=Vc;
VvRP27 = np.zeros(shape=(td))
VvRP27[0:td]=Vc;
VvRP28 = np.zeros(shape=(td))
VvRP28[0:td]=Vc;
VvRP29 = np.zeros(shape=(td))
VvRP29[0:td]=Vc;
VvRP30 = np.zeros(shape=(td))
VvRP30[0:td]=Vc;
VvRP31 = np.zeros(shape=(td))
VvRP31[0:td]=Vc;
VvRP32 = np.zeros(shape=(td))
VvRP32[0:td]=Vc;
VvRP33 = np.zeros(shape=(td))
VvRP33[0:td]=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c;
VvP[143-1]=Vc;
VvP[144-1]=Vc;
VvP[145-1]=Vc;
VvP[146-1]=Vc;
VvP[147-1]=Vc;
VvP[148-1]=Vc;
VvP[149-1]=Vc;
VvP[150-1]=Vc;
VvP[151-1]=Vc;
VvP[152-1]=Vc;
VvP[153-1]=Vc;
VvP[154-1]=Vc;
VvP[155-1]=Vc;
VvP[156-1]=Vc;
VvP[157-1]=Vc;
VvP[158-1]=Vc;
VvP[159-1]=Vc;
VvP[160-1]=Vc;
VvP[161-1]=Vc;
VvP[162-1]=Vc;
VvP[163-1]=Vc;
VvP[164-1]=Vc;
VvP[165-1]=Vc;
VvP[166-1]=Vc;
VvP[167-1]=Vc;
VvP[168-1]=Vc;
VvP[169-1]=Vc;
VvP[170-1]=Vc;
VvP[171-1]=Vc;
VvP[172-1]=Vc;
VvP[173-1]=Vc;
VvP[174-1]=Vc;
VvP[175-1]=Vc;
VvP[176-1]=Vc;
VvP[177-1]=Vn;
VvP[178-1]=Vc;
VvP[179-1]=Vc;
VvP[180-1]=Vc;
VvP[181-1]=Vc;
VvP[182-1]=Vn;
VvP[183-1]=Vc;
VvP[184-1]=Vc;
VvP[185-1]=Vc;
VvP[186-1]=Vc;
VvP[187-1:190]=Vc;
# VvDA **
# NONE as these are all transcriptional control mechanisms.
# VvDP **
VvDP = np.zeros(shape=(4))
VvDP[0]=Vc;
VvDP[1]=Vc;
VvDP[2]=Vc;
VvDP[3]=Vc;
# VvPA **
VvPA = np.zeros(shape=(11))
VvPA[1-1]=Vc;
VvPA[2-1]=Vc;
VvPA[3-1]=Vc;
VvPA[4-1]=Vc;
VvPA[5-1]=Vc;
VvPA[6-1]=Vc;
VvPA[7-1]=Vc;
VvPA[8-1]=Vc;
VvPA[9-1]=Vc;
VvPA[10-1]=Vc;
VvPA[11-1]=Vc
# VvPC **
# NONE as these are all transcriptional control mechanisms.
#
# VvDC **
# NONE as these are all transcriptional control mechanisms.
# %%%%%%% DEGRADATION
# still within if statement
S_dtemp=S_d;
S_dtemp[S_d==1] = 0
S_dtemp = S_dtemp.astype(bool).astype(int)
VvXd = np.matrix.transpose(S_dtemp)*Vx
# Transpose and Concatenate
VvRP=[VvRP1,VvRP2,VvRP3,VvRP4,VvRP5,VvRP6,VvRP7,VvRP8,VvRP9,VvRP10,VvRP11,VvRP12,VvRP13,VvRP14,VvRP15,VvRP16,VvRP17,VvRP18,VvRP19,VvRP20,VvRP21,VvRP22,VvRP23,VvRP24,VvRP25,VvRP26,VvRP27,VvRP28,VvRP29,VvRP30,VvRP31,VvRP32,VvRP33,VvRP34];
# Vv=[VvbR;VvdR;VvTL';VvTLCd';VvE';VvD';VvC';VvA';VvR';VvRP';VvP';VvDP';VvPA';VvXd];
Vv = np.array([])
Vv = np.append(Vv,VvbR)
Vv = np.append(Vv,VvdR)
Vv = np.append(Vv,VvTL)
Vv = np.append(Vv,VvTLCd)
Vv = np.append(Vv,VvE)
Vv = np.append(Vv,VvD)
Vv = np.append(Vv,VvC)
Vv = np.append(Vv,VvA)
Vv = np.append(Vv,VvR)
Vv = np.append(Vv,VvRP)
Vv = np.append(Vv,VvP)
Vv = np.append(Vv,VvDP)
Vv = np.append(Vv,VvPA)
Vv = np.append(Vv,np.matrix.transpose(VvXd))
# to_measure = [VvbR,VvdR,VvTL,VvTLCd,VvE,VvD,VvC,VvA,VvR,VvRP1,VvRP2,VvRP3,VvRP4,VvRP5,VvRP6,VvRP7,VvRP8,VvRP9,VvRP10,VvRP11,VvRP12,VvRP13,VvRP14,VvRP15,VvRP16,VvRP17,VvRP18,VvRP19,VvRP20,VvRP21,VvRP22,VvRP23,VvRP24,VvRP25,VvRP26,VvRP27,VvRP28,VvRP29,VvRP30,VvRP31,VvRP32,VvRP33,VvRP34,VvP,VvDP,VvPA,VvXd]
real_Vv = np.array([])
for item in Vv:
if type(item) == float:
real_Vv = np.append(real_Vv,item)
else:
for element in item:
real_Vv = np.append(real_Vv,element)
real_Vv = np.matrix(real_Vv)
real_Vv = np.matrix.transpose(real_Vv)
return [Vx,real_Vv,VxTL]