-
Notifications
You must be signed in to change notification settings - Fork 1
/
testing_AUC.R
8520 lines (6920 loc) · 557 KB
/
testing_AUC.R
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
996
997
998
999
1000
## THIS SCRIPT GETS AUC VALUES FOR OVERALL AND BY CANCER TYPE
## load necessary packages ----
if (!require ('ggplot2')) install.packages('ggplot2')
library(ggplot2) # general plotting functions
if (!require ('ROCR')) install.packages('ROCR')
library(ROCR) # for drawing AUC curves
if (!require ('gplots')) install.packages('gplots')
library(gplots) # for heatmap.2 functionality
if (!require ('survival')) install.packages('survival')
library(survival) # for survival curve functions
if (!require ('survminer')) install.packages('survminer')
library(survminer) # for additional survival curve design
if (!require ('ComplexHeatmap')) BiocInstaller::biocLite('ComplexHeatmap')
library(ComplexHeatmap) # for increased heatmap design
if (!require ('formattable')) install.packages('formattable')
library(formattable) # for table formatting and output
if(!require ('htmltools')) install.packages('htmltools')
library(htmltools) # to support formattable functions
if (!require ('webshot')) install.packages('webshot')
library(webshot) # to support formattavle functions
if (!require ('glmnet')) install.packages('glmnet')
library(glmnet)
library(survminer)
library(survival)
### GDSC ------
## load clinical data ----
cisplatin <- read.csv('Processed_Clinical_Data/cisplatin_gdsc_clinical_processed.csv', row.names = 1)
etoposide <- read.csv('Processed_Clinical_Data/etoposide_gdsc_clinical_processed.csv', row.names = 1)
gemcitabine <- read.csv('Processed_Clinical_Data/gemcitabine_gdsc_clinical_processed.csv', row.names = 1)
methotrexate <- read.csv('Processed_Clinical_Data/methotrexate_gdsc_clinical_processed.csv', row.names = 1)
## load gene expression data ----
gdsc_rna_seq <- read.csv('Processed_Gene_Expression/gdsc_rna_seq_processed.csv')
rownames(gdsc_rna_seq) <- make.names(gdsc_rna_seq$X, unique = TRUE)
gdsc_rna_seq <- gdsc_rna_seq[, -1]
colnames(gdsc_rna_seq) <- gsub('X', '', colnames(gdsc_rna_seq))
### set up data for model building ----------
# get names of GDSC cell lines treated with each drug
cisplatin_lines <- cisplatin$COSMIC_ID #680
etoposide_lines <- etoposide$COSMIC_ID #718
methotrexate_lines <- methotrexate$COSMIC_ID # 679
# set GDSC to usable format
gdsc <- data.frame(t(gdsc_rna_seq)) # puts predictors in columns
rownames(gdsc) <- gsub('X', '', rownames(gdsc))
# dim: 962 x 14209
# split GDSC in half randomly
set.seed(5)
# get random numbers to use for split
random_sample <- sample(x = rownames(gdsc), size = nrow(gdsc)/2)
# create function opposite of %in%
'%ni%' <- Negate('%in%')
# get training and testing sets
gdsc_train <- gdsc[random_sample, ] #481 x 14209
gdsc_test <- gdsc[which(rownames(gdsc) %ni% random_sample), ] #481 x 14209
# make sure zero overlap
intersect(rownames(gdsc_train), rownames(gdsc_test))
# create training/testing sets for each drug
cisplatin_rna_seq_train <- gdsc_train[intersect(cisplatin_lines, rownames(gdsc_train)), ]
# 338 x 14209
cisplatin_rna_seq_test <- gdsc_test[intersect(cisplatin_lines, rownames(gdsc_test)), ]
# 342 x 14209
etoposide_rna_seq_train <- gdsc_train[intersect(etoposide_lines, rownames(gdsc_train)), ]
# 352 x 14209
etoposide_rna_seq_test <- gdsc_test[intersect(etoposide_lines, rownames(gdsc_test)), ]
# 366 x 14209
methotrexate_rna_seq_train <- gdsc_train[intersect(methotrexate_lines, rownames(gdsc_train)), ]
# 337 x 14209
methotrexate_rna_seq_test <- gdsc_test[intersect(methotrexate_lines, rownames(gdsc_test)), ]
# 342 x 14209
# split clinical data
cisplatin_train <- cisplatin[which(cisplatin$COSMIC_ID %in% rownames(cisplatin_rna_seq_train)), ]
cisplatin_test <- cisplatin[which(cisplatin$COSMIC_ID %in% rownames(cisplatin_rna_seq_test)), ]
etoposide_train <- etoposide[which(etoposide$COSMIC_ID %in% rownames(etoposide_rna_seq_train)), ]
etoposide_test <- etoposide[which(etoposide$COSMIC_ID %in% rownames(etoposide_rna_seq_test)), ]
methotrexate_train <- methotrexate[which(methotrexate$COSMIC_ID %in% rownames(methotrexate_rna_seq_train)), ]
methotrexate_test <- methotrexate[which(methotrexate$COSMIC_ID %in% rownames(methotrexate_rna_seq_test)), ]
# scale data
cisplatin_rna_seq_train_scaled <- apply(cisplatin_rna_seq_train, 2, scale)
cisplatin_rna_seq_test_scaled <- as.data.frame(apply(cisplatin_rna_seq_test, 2, scale))
etoposide_rna_seq_train_scaled <- apply(etoposide_rna_seq_train, 2, scale)
etoposide_rna_seq_test_scaled <- as.data.frame(apply(etoposide_rna_seq_test, 2, scale))
methotrexate_rna_seq_train_scaled <- apply(methotrexate_rna_seq_train, 2, scale)
methotrexate_rna_seq_test_scaled <- as.data.frame(apply(methotrexate_rna_seq_test, 2, scale))
### load models ----
cisplatin_most_fit_elnet <- readRDS('GLM_Models/cisplatin_most_model.rds')
cisplatin_least_fit_elnet <- readRDS('GLM_Models/cisplatin_least_model.rds')
etoposide_most_fit_elnet <- readRDS('GLM_Models/etoposide_most_model.rds')
etoposide_least_fit_elnet <- readRDS('GLM_Models/etoposide_least_model.rds')
methotrexate_most_fit_elnet <- readRDS('GLM_Models/methotrexate_most_model.rds')
methotrexate_least_fit_elnet <- readRDS('GLM_Models/methotrexate_least_model.rds')
### get accuracy on testing data --------
## CISPLATIN
new_cisplatin_1se <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_rna_seq_test), s = 'lambda.1se', interval = 'confidence', probability = FALSE, type = 'response')
cisplatin_test_gdsc_auc_1se <- auc(cisplatin_test$res_sens, new_cisplatin_1se)
cisplatin_test_gdsc_auc_1se <- round(cisplatin_test_gdsc_auc_1se, digits = 2)
## ETOPOSIDE
new_etoposide_most_sensitive_min <- predict(etoposide_most_fit_elnet, newx = as.matrix(etoposide_rna_seq_test_scaled), s = 'lambda.min', interval = 'confidence', probability = FALSE, type = 'response')
etoposide_most_test_gdsc_auc_min <- auc(etoposide_test$most_sensitive, new_etoposide_most_sensitive_min)
etoposide_most_test_gdsc_auc_min <- round(etoposide_most_test_gdsc_auc_min, digits = 2)
new_etoposide_least_sensitive_min <- predict(etoposide_least_fit_elnet, newx = as.matrix(etoposide_rna_seq_test_scaled), s = 'lambda.min', interval = 'confidence', probability = FALSE, type = 'response')
etoposide_least_test_gdsc_auc_min <- auc(etoposide_test$least_sensitive, new_etoposide_least_sensitive_min)
etoposide_least_test_gdsc_auc_min <- round(etoposide_least_test_gdsc_auc_min, digits = 2)
## METHOTREXATE
new_methotrexate_most_sensitive_min <- predict(methotrexate_most_fit_elnet, newx = as.matrix(methotrexate_rna_seq_test_scaled), s = 'lambda.min', interval = 'confidence', probability = FALSE, type = 'response')
methotrexate_most_test_gdsc_auc_min <- auc(methotrexate_test$most_sensitive, new_methotrexate_most_sensitive_min)
methotrexate_most_test_gdsc_auc_min <- round(methotrexate_most_test_gdsc_auc_min, digits = 2)
new_methotrexate_least_sensitive_1se <- predict(methotrexate_least_fit_elnet, newx = as.matrix(methotrexate_rna_seq_test_scaled), s = 'lambda.1se', interval = 'confidence', probability = FALSE, type = 'response')
methotrexate_least_test_gdsc_auc_1se <- auc(methotrexate_test$least_sensitive, new_methotrexate_least_sensitive_1se)
methotrexate_least_test_gdsc_auc_1se <- round(methotrexate_least_test_gdsc_auc_1se, digits = 2)
#put them together
overall_auc <- c(bleomycin_preds, camptothecin_preds, cisplatin_preds, cytarabine_preds, doxorubicin_preds,
etoposide_preds, gemcitabine_preds, methotrexate_preds, mitomycin_preds,
sn38_preds, temozolomide_preds)
# subsetting lines by cancer type
bleomycin_aero_dig_tract_lines <- bleomycin_test$Cell_line_tissue_type == 'aero_dig_tract'
bleomycin_bone_lines <- bleomycin_test$Cell_line_tissue_type == 'bone'
bleomycin_breast_lines <- bleomycin_test$Cell_line_tissue_type == 'breast'
bleomycin_digestive_system_lines <- bleomycin_test$Cell_line_tissue_type == 'digestive_system'
bleomycin_kidney_lines <- bleomycin_test$Cell_line_tissue_type == 'kidney'
bleomycin_large_intestine_lines <- bleomycin_test$Cell_line_tissue_type == 'large_intestine'
bleomycin_lung_lines <- bleomycin_test$Cell_line_tissue_type == 'lung'
bleomycin_lung_NSCLC_lines <- bleomycin_test$Cell_line_tissue_type == 'lung_NSCLC'
bleomycin_lung_SCLC_lines <- bleomycin_test$Cell_line_tissue_type == 'lung_SCLC'
bleomycin_nervous_system_lines <- bleomycin_test$Cell_line_tissue_type == 'nervous_system'
bleomycin_neuroblastoma_lines <- bleomycin_test$Cell_line_tissue_type == 'neuroblastoma'
bleomycin_pancreas_lines <- bleomycin_test$Cell_line_tissue_type == 'pancreas'
bleomycin_skin_lines <- bleomycin_test$Cell_line_tissue_type == 'skin'
bleomycin_soft_tissue_lines <- bleomycin_test$Cell_line_tissue_type == 'soft_tissue'
bleomycin_thyroid_lines <- bleomycin_test$Cell_line_tissue_type == 'thyroid'
bleomycin_urogenital_system_lines <- bleomycin_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
bleomycin_test_aero_dig_tract_exp <- bleomycin_rna_seq_test[bleomycin_aero_dig_tract_lines, ]
bleomycin_test_aero_dig_tract <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_aero_dig_tract_auc <- sum(bleomycin_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_bone_exp <- bleomycin_rna_seq_test[bleomycin_bone_lines, ]
bleomycin_test_bone <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_bone_auc <- sum(bleomycin_test_bone$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_breast_exp <- bleomycin_rna_seq_test[bleomycin_breast_lines, ]
bleomycin_test_breast <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_breast_auc <- sum(bleomycin_test_breast$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_digestive_system_exp <- bleomycin_rna_seq_test[bleomycin_digestive_system_lines, ]
bleomycin_test_digestive_system <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_digestive_system_auc <- sum(bleomycin_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_kidney_exp <- bleomycin_rna_seq_test[bleomycin_kidney_lines, ]
bleomycin_test_kidney <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_kidney_auc <- sum(bleomycin_test_kidney$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_large_intestine_exp <- bleomycin_rna_seq_test[bleomycin_large_intestine_lines, ]
bleomycin_test_large_intestine <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_large_intestine_auc <- sum(bleomycin_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_lung_exp <- bleomycin_rna_seq_test[bleomycin_lung_lines, ]
bleomycin_test_lung <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_lung_auc <- sum(bleomycin_test_lung$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_lung_NSCLC_exp <- bleomycin_rna_seq_test[bleomycin_lung_NSCLC_lines, ]
bleomycin_test_lung_NSCLC <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_lung_NSCLC_auc <- sum(bleomycin_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_lung_SCLC_exp <- bleomycin_rna_seq_test[bleomycin_lung_SCLC_lines, ]
bleomycin_test_lung_SCLC <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_lung_SCLC_auc <- sum(bleomycin_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_nervous_system_exp <- bleomycin_rna_seq_test[bleomycin_nervous_system_lines, ]
bleomycin_test_nervous_system <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_nervous_system_auc <- sum(bleomycin_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_neuroblastoma_exp <- bleomycin_rna_seq_test[bleomycin_neuroblastoma_lines, ]
bleomycin_test_neuroblastoma <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_neuroblastoma_auc <- sum(bleomycin_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_pancreas_exp <- bleomycin_rna_seq_test[bleomycin_pancreas_lines, ]
bleomycin_test_pancreas <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_pancreas_auc <- sum(bleomycin_test_pancreas$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_skin_exp <- bleomycin_rna_seq_test[bleomycin_skin_lines, ]
bleomycin_test_skin <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_skin_auc <- sum(bleomycin_test_skin$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_soft_tissue_exp <- bleomycin_rna_seq_test[bleomycin_soft_tissue_lines, ]
bleomycin_test_soft_tissue <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_soft_tissue_auc <- sum(bleomycin_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_thyroid_exp <- bleomycin_rna_seq_test[bleomycin_thyroid_lines, ]
bleomycin_test_thyroid <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_thyroid_auc <- sum(bleomycin_test_thyroid$res_sens == new_ic50)/length(new_ic50)
bleomycin_test_urogenital_system_exp <- bleomycin_rna_seq_test[bleomycin_urogenital_system_lines, ]
bleomycin_test_urogenital_system <- bleomycin_test[which(bleomycin_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(bleomycin_fit_elnet, newx = as.matrix(bleomycin_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
bleomycin_urogenital_system_auc <- sum(bleomycin_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
bleomycin_auc <- c(bleomycin_aero_dig_tract_auc, bleomycin_bone_auc,
bleomycin_breast_auc, bleomycin_digestive_system_auc,
bleomycin_kidney_auc, bleomycin_large_intestine_auc,
bleomycin_lung_auc, bleomycin_lung_NSCLC_auc, bleomycin_lung_SCLC_auc,
bleomycin_nervous_system_auc, bleomycin_neuroblastoma_auc,
bleomycin_pancreas_auc, bleomycin_skin_auc,
bleomycin_soft_tissue_auc, bleomycin_thyroid_auc,
bleomycin_urogenital_system_auc)
camptothecin_aero_dig_tract_lines <- camptothecin_test$Cell_line_tissue_type == 'aero_dig_tract'
camptothecin_bone_lines <- camptothecin_test$Cell_line_tissue_type == 'bone'
camptothecin_breast_lines <- camptothecin_test$Cell_line_tissue_type == 'breast'
camptothecin_digestive_system_lines <- camptothecin_test$Cell_line_tissue_type == 'digestive_system'
camptothecin_kidney_lines <- camptothecin_test$Cell_line_tissue_type == 'kidney'
camptothecin_large_intestine_lines <- camptothecin_test$Cell_line_tissue_type == 'large_intestine'
camptothecin_lung_lines <- camptothecin_test$Cell_line_tissue_type == 'lung'
camptothecin_lung_NSCLC_lines <- camptothecin_test$Cell_line_tissue_type == 'lung_NSCLC'
camptothecin_lung_SCLC_lines <- camptothecin_test$Cell_line_tissue_type == 'lung_SCLC'
camptothecin_nervous_system_lines <- camptothecin_test$Cell_line_tissue_type == 'nervous_system'
camptothecin_neuroblastoma_lines <- camptothecin_test$Cell_line_tissue_type == 'neuroblastoma'
camptothecin_pancreas_lines <- camptothecin_test$Cell_line_tissue_type == 'pancreas'
camptothecin_skin_lines <- camptothecin_test$Cell_line_tissue_type == 'skin'
camptothecin_soft_tissue_lines <- camptothecin_test$Cell_line_tissue_type == 'soft_tissue'
camptothecin_thyroid_lines <- camptothecin_test$Cell_line_tissue_type == 'thyroid'
camptothecin_urogenital_system_lines <- camptothecin_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
camptothecin_test_aero_dig_tract_exp <- camptothecin_rna_seq_test[camptothecin_aero_dig_tract_lines, ]
camptothecin_test_aero_dig_tract <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_aero_dig_tract_auc <- sum(camptothecin_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_bone_exp <- camptothecin_rna_seq_test[camptothecin_bone_lines, ]
camptothecin_test_bone <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_bone_auc <- sum(camptothecin_test_bone$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_breast_exp <- camptothecin_rna_seq_test[camptothecin_breast_lines, ]
camptothecin_test_breast <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_breast_auc <- sum(camptothecin_test_breast$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_digestive_system_exp <- camptothecin_rna_seq_test[camptothecin_digestive_system_lines, ]
camptothecin_test_digestive_system <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_digestive_system_auc <- sum(camptothecin_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_kidney_exp <- camptothecin_rna_seq_test[camptothecin_kidney_lines, ]
camptothecin_test_kidney <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_kidney_auc <- sum(camptothecin_test_kidney$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_large_intestine_exp <- camptothecin_rna_seq_test[camptothecin_large_intestine_lines, ]
camptothecin_test_large_intestine <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_large_intestine_auc <- sum(camptothecin_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_lung_exp <- camptothecin_rna_seq_test[camptothecin_lung_lines, ]
camptothecin_test_lung <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_lung_auc <- sum(camptothecin_test_lung$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_lung_NSCLC_exp <- camptothecin_rna_seq_test[camptothecin_lung_NSCLC_lines, ]
camptothecin_test_lung_NSCLC <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_lung_NSCLC_auc <- sum(camptothecin_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_lung_SCLC_exp <- camptothecin_rna_seq_test[camptothecin_lung_SCLC_lines, ]
camptothecin_test_lung_SCLC <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_lung_SCLC_auc <- sum(camptothecin_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_nervous_system_exp <- camptothecin_rna_seq_test[camptothecin_nervous_system_lines, ]
camptothecin_test_nervous_system <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_nervous_system_auc <- sum(camptothecin_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_neuroblastoma_exp <- camptothecin_rna_seq_test[camptothecin_neuroblastoma_lines, ]
camptothecin_test_neuroblastoma <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_neuroblastoma_auc <- sum(camptothecin_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_pancreas_exp <- camptothecin_rna_seq_test[camptothecin_pancreas_lines, ]
camptothecin_test_pancreas <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_pancreas_auc <- sum(camptothecin_test_pancreas$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_skin_exp <- camptothecin_rna_seq_test[camptothecin_skin_lines, ]
camptothecin_test_skin <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_skin_auc <- sum(camptothecin_test_skin$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_soft_tissue_exp <- camptothecin_rna_seq_test[camptothecin_soft_tissue_lines, ]
camptothecin_test_soft_tissue <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_soft_tissue_auc <- sum(camptothecin_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_thyroid_exp <- camptothecin_rna_seq_test[camptothecin_thyroid_lines, ]
camptothecin_test_thyroid <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_thyroid_auc <- sum(camptothecin_test_thyroid$res_sens == new_ic50)/length(new_ic50)
camptothecin_test_urogenital_system_exp <- camptothecin_rna_seq_test[camptothecin_urogenital_system_lines, ]
camptothecin_test_urogenital_system <- camptothecin_test[which(camptothecin_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(camptothecin_fit_elnet, newx = as.matrix(camptothecin_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
camptothecin_urogenital_system_auc <- sum(camptothecin_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
camptothecin_auc <- c(camptothecin_aero_dig_tract_auc, camptothecin_bone_auc,
camptothecin_breast_auc, camptothecin_digestive_system_auc,
camptothecin_kidney_auc, camptothecin_large_intestine_auc,
camptothecin_lung_auc, camptothecin_lung_NSCLC_auc, camptothecin_lung_SCLC_auc,
camptothecin_nervous_system_auc, camptothecin_neuroblastoma_auc,
camptothecin_pancreas_auc, camptothecin_skin_auc,
camptothecin_soft_tissue_auc, camptothecin_thyroid_auc,
camptothecin_urogenital_system_auc)
cisplatin_aero_dig_tract_lines <- cisplatin_test$Cell_line_tissue_type == 'aero_dig_tract'
cisplatin_bone_lines <- cisplatin_test$Cell_line_tissue_type == 'bone'
cisplatin_breast_lines <- cisplatin_test$Cell_line_tissue_type == 'breast'
cisplatin_digestive_system_lines <- cisplatin_test$Cell_line_tissue_type == 'digestive_system'
cisplatin_kidney_lines <- cisplatin_test$Cell_line_tissue_type == 'kidney'
cisplatin_large_intestine_lines <- cisplatin_test$Cell_line_tissue_type == 'large_intestine'
cisplatin_lung_lines <- cisplatin_test$Cell_line_tissue_type == 'lung'
cisplatin_lung_NSCLC_lines <- cisplatin_test$Cell_line_tissue_type == 'lung_NSCLC'
cisplatin_lung_SCLC_lines <- cisplatin_test$Cell_line_tissue_type == 'lung_SCLC'
cisplatin_nervous_system_lines <- cisplatin_test$Cell_line_tissue_type == 'nervous_system'
cisplatin_neuroblastoma_lines <- cisplatin_test$Cell_line_tissue_type == 'neuroblastoma'
cisplatin_pancreas_lines <- cisplatin_test$Cell_line_tissue_type == 'pancreas'
cisplatin_skin_lines <- cisplatin_test$Cell_line_tissue_type == 'skin'
cisplatin_soft_tissue_lines <- cisplatin_test$Cell_line_tissue_type == 'soft_tissue'
cisplatin_thyroid_lines <- cisplatin_test$Cell_line_tissue_type == 'thyroid'
cisplatin_urogenital_system_lines <- cisplatin_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
cisplatin_test_aero_dig_tract_exp <- cisplatin_rna_seq_test[cisplatin_aero_dig_tract_lines, ]
cisplatin_test_aero_dig_tract <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_aero_dig_tract_auc <- sum(cisplatin_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_bone_exp <- cisplatin_rna_seq_test[cisplatin_bone_lines, ]
cisplatin_test_bone <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_bone_auc <- sum(cisplatin_test_bone$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_breast_exp <- cisplatin_rna_seq_test[cisplatin_breast_lines, ]
cisplatin_test_breast <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_breast_auc <- sum(cisplatin_test_breast$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_digestive_system_exp <- cisplatin_rna_seq_test[cisplatin_digestive_system_lines, ]
cisplatin_test_digestive_system <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_digestive_system_auc <- sum(cisplatin_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_kidney_exp <- cisplatin_rna_seq_test[cisplatin_kidney_lines, ]
cisplatin_test_kidney <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_kidney_auc <- sum(cisplatin_test_kidney$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_large_intestine_exp <- cisplatin_rna_seq_test[cisplatin_large_intestine_lines, ]
cisplatin_test_large_intestine <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_large_intestine_auc <- sum(cisplatin_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_lung_exp <- cisplatin_rna_seq_test[cisplatin_lung_lines, ]
cisplatin_test_lung <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_lung_auc <- sum(cisplatin_test_lung$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_lung_NSCLC_exp <- cisplatin_rna_seq_test[cisplatin_lung_NSCLC_lines, ]
cisplatin_test_lung_NSCLC <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_lung_NSCLC_auc <- sum(cisplatin_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_lung_SCLC_exp <- cisplatin_rna_seq_test[cisplatin_lung_SCLC_lines, ]
cisplatin_test_lung_SCLC <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_lung_SCLC_auc <- sum(cisplatin_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_nervous_system_exp <- cisplatin_rna_seq_test[cisplatin_nervous_system_lines, ]
cisplatin_test_nervous_system <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_nervous_system_auc <- sum(cisplatin_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_neuroblastoma_exp <- cisplatin_rna_seq_test[cisplatin_neuroblastoma_lines, ]
cisplatin_test_neuroblastoma <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_neuroblastoma_auc <- sum(cisplatin_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_pancreas_exp <- cisplatin_rna_seq_test[cisplatin_pancreas_lines, ]
cisplatin_test_pancreas <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_pancreas_auc <- sum(cisplatin_test_pancreas$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_skin_exp <- cisplatin_rna_seq_test[cisplatin_skin_lines, ]
cisplatin_test_skin <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_skin_auc <- sum(cisplatin_test_skin$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_soft_tissue_exp <- cisplatin_rna_seq_test[cisplatin_soft_tissue_lines, ]
cisplatin_test_soft_tissue <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_soft_tissue_auc <- sum(cisplatin_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_thyroid_exp <- cisplatin_rna_seq_test[cisplatin_thyroid_lines, ]
cisplatin_test_thyroid <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_thyroid_auc <- sum(cisplatin_test_thyroid$res_sens == new_ic50)/length(new_ic50)
cisplatin_test_urogenital_system_exp <- cisplatin_rna_seq_test[cisplatin_urogenital_system_lines, ]
cisplatin_test_urogenital_system <- cisplatin_test[which(cisplatin_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(cisplatin_fit_elnet, newx = as.matrix(cisplatin_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cisplatin_urogenital_system_auc <- sum(cisplatin_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
cisplatin_auc <- c(cisplatin_aero_dig_tract_auc, cisplatin_bone_auc,
cisplatin_breast_auc, cisplatin_digestive_system_auc,
cisplatin_kidney_auc, cisplatin_large_intestine_auc,
cisplatin_lung_auc, cisplatin_lung_NSCLC_auc, cisplatin_lung_SCLC_auc,
cisplatin_nervous_system_auc, cisplatin_neuroblastoma_auc,
cisplatin_pancreas_auc, cisplatin_skin_auc,
cisplatin_soft_tissue_auc, cisplatin_thyroid_auc,
cisplatin_urogenital_system_auc)
cytarabine_aero_dig_tract_lines <- cytarabine_test$Cell_line_tissue_type == 'aero_dig_tract'
cytarabine_bone_lines <- cytarabine_test$Cell_line_tissue_type == 'bone'
cytarabine_breast_lines <- cytarabine_test$Cell_line_tissue_type == 'breast'
cytarabine_digestive_system_lines <- cytarabine_test$Cell_line_tissue_type == 'digestive_system'
cytarabine_kidney_lines <- cytarabine_test$Cell_line_tissue_type == 'kidney'
cytarabine_large_intestine_lines <- cytarabine_test$Cell_line_tissue_type == 'large_intestine'
cytarabine_lung_lines <- cytarabine_test$Cell_line_tissue_type == 'lung'
cytarabine_lung_NSCLC_lines <- cytarabine_test$Cell_line_tissue_type == 'lung_NSCLC'
cytarabine_lung_SCLC_lines <- cytarabine_test$Cell_line_tissue_type == 'lung_SCLC'
cytarabine_nervous_system_lines <- cytarabine_test$Cell_line_tissue_type == 'nervous_system'
cytarabine_neuroblastoma_lines <- cytarabine_test$Cell_line_tissue_type == 'neuroblastoma'
cytarabine_pancreas_lines <- cytarabine_test$Cell_line_tissue_type == 'pancreas'
cytarabine_skin_lines <- cytarabine_test$Cell_line_tissue_type == 'skin'
cytarabine_soft_tissue_lines <- cytarabine_test$Cell_line_tissue_type == 'soft_tissue'
cytarabine_thyroid_lines <- cytarabine_test$Cell_line_tissue_type == 'thyroid'
cytarabine_urogenital_system_lines <- cytarabine_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
cytarabine_test_aero_dig_tract_exp <- cytarabine_rna_seq_test[cytarabine_aero_dig_tract_lines, ]
cytarabine_test_aero_dig_tract <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_aero_dig_tract_auc <- sum(cytarabine_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_bone_exp <- cytarabine_rna_seq_test[cytarabine_bone_lines, ]
cytarabine_test_bone <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_bone_auc <- sum(cytarabine_test_bone$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_breast_exp <- cytarabine_rna_seq_test[cytarabine_breast_lines, ]
cytarabine_test_breast <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_breast_auc <- sum(cytarabine_test_breast$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_digestive_system_exp <- cytarabine_rna_seq_test[cytarabine_digestive_system_lines, ]
cytarabine_test_digestive_system <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_digestive_system_auc <- sum(cytarabine_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_kidney_exp <- cytarabine_rna_seq_test[cytarabine_kidney_lines, ]
cytarabine_test_kidney <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_kidney_auc <- sum(cytarabine_test_kidney$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_large_intestine_exp <- cytarabine_rna_seq_test[cytarabine_large_intestine_lines, ]
cytarabine_test_large_intestine <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_large_intestine_auc <- sum(cytarabine_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_lung_exp <- cytarabine_rna_seq_test[cytarabine_lung_lines, ]
cytarabine_test_lung <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_lung_auc <- sum(cytarabine_test_lung$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_lung_NSCLC_exp <- cytarabine_rna_seq_test[cytarabine_lung_NSCLC_lines, ]
cytarabine_test_lung_NSCLC <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_lung_NSCLC_auc <- sum(cytarabine_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_lung_SCLC_exp <- cytarabine_rna_seq_test[cytarabine_lung_SCLC_lines, ]
cytarabine_test_lung_SCLC <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_lung_SCLC_auc <- sum(cytarabine_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_nervous_system_exp <- cytarabine_rna_seq_test[cytarabine_nervous_system_lines, ]
cytarabine_test_nervous_system <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_nervous_system_auc <- sum(cytarabine_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_neuroblastoma_exp <- cytarabine_rna_seq_test[cytarabine_neuroblastoma_lines, ]
cytarabine_test_neuroblastoma <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_neuroblastoma_auc <- sum(cytarabine_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_pancreas_exp <- cytarabine_rna_seq_test[cytarabine_pancreas_lines, ]
cytarabine_test_pancreas <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_pancreas_auc <- sum(cytarabine_test_pancreas$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_skin_exp <- cytarabine_rna_seq_test[cytarabine_skin_lines, ]
cytarabine_test_skin <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_skin_auc <- sum(cytarabine_test_skin$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_soft_tissue_exp <- cytarabine_rna_seq_test[cytarabine_soft_tissue_lines, ]
cytarabine_test_soft_tissue <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_soft_tissue_auc <- sum(cytarabine_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_thyroid_exp <- cytarabine_rna_seq_test[cytarabine_thyroid_lines, ]
cytarabine_test_thyroid <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_thyroid_auc <- sum(cytarabine_test_thyroid$res_sens == new_ic50)/length(new_ic50)
cytarabine_test_urogenital_system_exp <- cytarabine_rna_seq_test[cytarabine_urogenital_system_lines, ]
cytarabine_test_urogenital_system <- cytarabine_test[which(cytarabine_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(cytarabine_fit_elnet, newx = as.matrix(cytarabine_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
cytarabine_urogenital_system_auc <- sum(cytarabine_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
cytarabine_auc <- c(cytarabine_aero_dig_tract_auc, cytarabine_bone_auc,
cytarabine_breast_auc, cytarabine_digestive_system_auc,
cytarabine_kidney_auc, cytarabine_large_intestine_auc,
cytarabine_lung_auc, cytarabine_lung_NSCLC_auc, cytarabine_lung_SCLC_auc,
cytarabine_nervous_system_auc, cytarabine_neuroblastoma_auc,
cytarabine_pancreas_auc, cytarabine_skin_auc,
cytarabine_soft_tissue_auc, cytarabine_thyroid_auc,
cytarabine_urogenital_system_auc)
doxorubicin_aero_dig_tract_lines <- doxorubicin_test$Cell_line_tissue_type == 'aero_dig_tract'
doxorubicin_bone_lines <- doxorubicin_test$Cell_line_tissue_type == 'bone'
doxorubicin_breast_lines <- doxorubicin_test$Cell_line_tissue_type == 'breast'
doxorubicin_digestive_system_lines <- doxorubicin_test$Cell_line_tissue_type == 'digestive_system'
doxorubicin_kidney_lines <- doxorubicin_test$Cell_line_tissue_type == 'kidney'
doxorubicin_large_intestine_lines <- doxorubicin_test$Cell_line_tissue_type == 'large_intestine'
doxorubicin_lung_lines <- doxorubicin_test$Cell_line_tissue_type == 'lung'
doxorubicin_lung_NSCLC_lines <- doxorubicin_test$Cell_line_tissue_type == 'lung_NSCLC'
doxorubicin_lung_SCLC_lines <- doxorubicin_test$Cell_line_tissue_type == 'lung_SCLC'
doxorubicin_nervous_system_lines <- doxorubicin_test$Cell_line_tissue_type == 'nervous_system'
doxorubicin_neuroblastoma_lines <- doxorubicin_test$Cell_line_tissue_type == 'neuroblastoma'
doxorubicin_pancreas_lines <- doxorubicin_test$Cell_line_tissue_type == 'pancreas'
doxorubicin_skin_lines <- doxorubicin_test$Cell_line_tissue_type == 'skin'
doxorubicin_soft_tissue_lines <- doxorubicin_test$Cell_line_tissue_type == 'soft_tissue'
doxorubicin_thyroid_lines <- doxorubicin_test$Cell_line_tissue_type == 'thyroid'
doxorubicin_urogenital_system_lines <- doxorubicin_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
doxorubicin_test_aero_dig_tract_exp <- doxorubicin_rna_seq_test[doxorubicin_aero_dig_tract_lines, ]
doxorubicin_test_aero_dig_tract <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_aero_dig_tract_auc <- sum(doxorubicin_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_bone_exp <- doxorubicin_rna_seq_test[doxorubicin_bone_lines, ]
doxorubicin_test_bone <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_bone_auc <- sum(doxorubicin_test_bone$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_breast_exp <- doxorubicin_rna_seq_test[doxorubicin_breast_lines, ]
doxorubicin_test_breast <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_breast_auc <- sum(doxorubicin_test_breast$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_digestive_system_exp <- doxorubicin_rna_seq_test[doxorubicin_digestive_system_lines, ]
doxorubicin_test_digestive_system <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_digestive_system_auc <- sum(doxorubicin_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_kidney_exp <- doxorubicin_rna_seq_test[doxorubicin_kidney_lines, ]
doxorubicin_test_kidney <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_kidney_auc <- sum(doxorubicin_test_kidney$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_large_intestine_exp <- doxorubicin_rna_seq_test[doxorubicin_large_intestine_lines, ]
doxorubicin_test_large_intestine <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_large_intestine_auc <- sum(doxorubicin_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_lung_exp <- doxorubicin_rna_seq_test[doxorubicin_lung_lines, ]
doxorubicin_test_lung <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_lung_auc <- sum(doxorubicin_test_lung$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_lung_NSCLC_exp <- doxorubicin_rna_seq_test[doxorubicin_lung_NSCLC_lines, ]
doxorubicin_test_lung_NSCLC <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_lung_NSCLC_auc <- sum(doxorubicin_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_lung_SCLC_exp <- doxorubicin_rna_seq_test[doxorubicin_lung_SCLC_lines, ]
doxorubicin_test_lung_SCLC <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_lung_SCLC_auc <- sum(doxorubicin_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_nervous_system_exp <- doxorubicin_rna_seq_test[doxorubicin_nervous_system_lines, ]
doxorubicin_test_nervous_system <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_nervous_system_auc <- sum(doxorubicin_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_neuroblastoma_exp <- doxorubicin_rna_seq_test[doxorubicin_neuroblastoma_lines, ]
doxorubicin_test_neuroblastoma <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_neuroblastoma_auc <- sum(doxorubicin_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_pancreas_exp <- doxorubicin_rna_seq_test[doxorubicin_pancreas_lines, ]
doxorubicin_test_pancreas <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_pancreas_auc <- sum(doxorubicin_test_pancreas$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_skin_exp <- doxorubicin_rna_seq_test[doxorubicin_skin_lines, ]
doxorubicin_test_skin <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_skin_auc <- sum(doxorubicin_test_skin$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_soft_tissue_exp <- doxorubicin_rna_seq_test[doxorubicin_soft_tissue_lines, ]
doxorubicin_test_soft_tissue <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_soft_tissue_auc <- sum(doxorubicin_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_thyroid_exp <- doxorubicin_rna_seq_test[doxorubicin_thyroid_lines, ]
doxorubicin_test_thyroid <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_thyroid_auc <- sum(doxorubicin_test_thyroid$res_sens == new_ic50)/length(new_ic50)
doxorubicin_test_urogenital_system_exp <- doxorubicin_rna_seq_test[doxorubicin_urogenital_system_lines, ]
doxorubicin_test_urogenital_system <- doxorubicin_test[which(doxorubicin_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(doxorubicin_fit_elnet, newx = as.matrix(doxorubicin_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
doxorubicin_urogenital_system_auc <- sum(doxorubicin_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
doxorubicin_auc <- c(doxorubicin_aero_dig_tract_auc, doxorubicin_bone_auc,
doxorubicin_breast_auc, doxorubicin_digestive_system_auc,
doxorubicin_kidney_auc, doxorubicin_large_intestine_auc,
doxorubicin_lung_auc, doxorubicin_lung_NSCLC_auc, doxorubicin_lung_SCLC_auc,
doxorubicin_nervous_system_auc, doxorubicin_neuroblastoma_auc,
doxorubicin_pancreas_auc, doxorubicin_skin_auc,
doxorubicin_soft_tissue_auc, doxorubicin_thyroid_auc,
doxorubicin_urogenital_system_auc)
etoposide_aero_dig_tract_lines <- etoposide_test$Cell_line_tissue_type == 'aero_dig_tract'
etoposide_bone_lines <- etoposide_test$Cell_line_tissue_type == 'bone'
etoposide_breast_lines <- etoposide_test$Cell_line_tissue_type == 'breast'
etoposide_digestive_system_lines <- etoposide_test$Cell_line_tissue_type == 'digestive_system'
etoposide_kidney_lines <- etoposide_test$Cell_line_tissue_type == 'kidney'
etoposide_large_intestine_lines <- etoposide_test$Cell_line_tissue_type == 'large_intestine'
etoposide_lung_lines <- etoposide_test$Cell_line_tissue_type == 'lung'
etoposide_lung_NSCLC_lines <- etoposide_test$Cell_line_tissue_type == 'lung_NSCLC'
etoposide_lung_SCLC_lines <- etoposide_test$Cell_line_tissue_type == 'lung_SCLC'
etoposide_nervous_system_lines <- etoposide_test$Cell_line_tissue_type == 'nervous_system'
etoposide_neuroblastoma_lines <- etoposide_test$Cell_line_tissue_type == 'neuroblastoma'
etoposide_pancreas_lines <- etoposide_test$Cell_line_tissue_type == 'pancreas'
etoposide_skin_lines <- etoposide_test$Cell_line_tissue_type == 'skin'
etoposide_soft_tissue_lines <- etoposide_test$Cell_line_tissue_type == 'soft_tissue'
etoposide_thyroid_lines <- etoposide_test$Cell_line_tissue_type == 'thyroid'
etoposide_urogenital_system_lines <- etoposide_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
etoposide_test_aero_dig_tract_exp <- etoposide_rna_seq_test[etoposide_aero_dig_tract_lines, ]
etoposide_test_aero_dig_tract <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_aero_dig_tract_auc <- sum(etoposide_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
etoposide_test_bone_exp <- etoposide_rna_seq_test[etoposide_bone_lines, ]
etoposide_test_bone <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_bone_auc <- sum(etoposide_test_bone$res_sens == new_ic50)/length(new_ic50)
etoposide_test_breast_exp <- etoposide_rna_seq_test[etoposide_breast_lines, ]
etoposide_test_breast <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_breast_auc <- sum(etoposide_test_breast$res_sens == new_ic50)/length(new_ic50)
etoposide_test_digestive_system_exp <- etoposide_rna_seq_test[etoposide_digestive_system_lines, ]
etoposide_test_digestive_system <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_digestive_system_auc <- sum(etoposide_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
etoposide_test_kidney_exp <- etoposide_rna_seq_test[etoposide_kidney_lines, ]
etoposide_test_kidney <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_kidney_auc <- sum(etoposide_test_kidney$res_sens == new_ic50)/length(new_ic50)
etoposide_test_large_intestine_exp <- etoposide_rna_seq_test[etoposide_large_intestine_lines, ]
etoposide_test_large_intestine <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_large_intestine_auc <- sum(etoposide_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
etoposide_test_lung_exp <- etoposide_rna_seq_test[etoposide_lung_lines, ]
etoposide_test_lung <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_lung_auc <- sum(etoposide_test_lung$res_sens == new_ic50)/length(new_ic50)
etoposide_test_lung_NSCLC_exp <- etoposide_rna_seq_test[etoposide_lung_NSCLC_lines, ]
etoposide_test_lung_NSCLC <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_lung_NSCLC_auc <- sum(etoposide_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
etoposide_test_lung_SCLC_exp <- etoposide_rna_seq_test[etoposide_lung_SCLC_lines, ]
etoposide_test_lung_SCLC <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_lung_SCLC_auc <- sum(etoposide_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
etoposide_test_nervous_system_exp <- etoposide_rna_seq_test[etoposide_nervous_system_lines, ]
etoposide_test_nervous_system <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_nervous_system_auc <- sum(etoposide_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
etoposide_test_neuroblastoma_exp <- etoposide_rna_seq_test[etoposide_neuroblastoma_lines, ]
etoposide_test_neuroblastoma <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_neuroblastoma_auc <- sum(etoposide_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
etoposide_test_pancreas_exp <- etoposide_rna_seq_test[etoposide_pancreas_lines, ]
etoposide_test_pancreas <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_pancreas_auc <- sum(etoposide_test_pancreas$res_sens == new_ic50)/length(new_ic50)
etoposide_test_skin_exp <- etoposide_rna_seq_test[etoposide_skin_lines, ]
etoposide_test_skin <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_skin_auc <- sum(etoposide_test_skin$res_sens == new_ic50)/length(new_ic50)
etoposide_test_soft_tissue_exp <- etoposide_rna_seq_test[etoposide_soft_tissue_lines, ]
etoposide_test_soft_tissue <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_soft_tissue_auc <- sum(etoposide_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
etoposide_test_thyroid_exp <- etoposide_rna_seq_test[etoposide_thyroid_lines, ]
etoposide_test_thyroid <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_thyroid_auc <- sum(etoposide_test_thyroid$res_sens == new_ic50)/length(new_ic50)
etoposide_test_urogenital_system_exp <- etoposide_rna_seq_test[etoposide_urogenital_system_lines, ]
etoposide_test_urogenital_system <- etoposide_test[which(etoposide_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(etoposide_fit_elnet, newx = as.matrix(etoposide_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
etoposide_urogenital_system_auc <- sum(etoposide_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
etoposide_auc <- c(etoposide_aero_dig_tract_auc, etoposide_bone_auc,
etoposide_breast_auc, etoposide_digestive_system_auc,
etoposide_kidney_auc, etoposide_large_intestine_auc,
etoposide_lung_auc, etoposide_lung_NSCLC_auc, etoposide_lung_SCLC_auc,
etoposide_nervous_system_auc, etoposide_neuroblastoma_auc,
etoposide_pancreas_auc, etoposide_skin_auc,
etoposide_soft_tissue_auc, etoposide_thyroid_auc,
etoposide_urogenital_system_auc)
gemcitabine_aero_dig_tract_lines <- gemcitabine_test$Cell_line_tissue_type == 'aero_dig_tract'
gemcitabine_bone_lines <- gemcitabine_test$Cell_line_tissue_type == 'bone'
gemcitabine_breast_lines <- gemcitabine_test$Cell_line_tissue_type == 'breast'
gemcitabine_digestive_system_lines <- gemcitabine_test$Cell_line_tissue_type == 'digestive_system'
gemcitabine_kidney_lines <- gemcitabine_test$Cell_line_tissue_type == 'kidney'
gemcitabine_large_intestine_lines <- gemcitabine_test$Cell_line_tissue_type == 'large_intestine'
gemcitabine_lung_lines <- gemcitabine_test$Cell_line_tissue_type == 'lung'
gemcitabine_lung_NSCLC_lines <- gemcitabine_test$Cell_line_tissue_type == 'lung_NSCLC'
gemcitabine_lung_SCLC_lines <- gemcitabine_test$Cell_line_tissue_type == 'lung_SCLC'
gemcitabine_nervous_system_lines <- gemcitabine_test$Cell_line_tissue_type == 'nervous_system'
gemcitabine_neuroblastoma_lines <- gemcitabine_test$Cell_line_tissue_type == 'neuroblastoma'
gemcitabine_pancreas_lines <- gemcitabine_test$Cell_line_tissue_type == 'pancreas'
gemcitabine_skin_lines <- gemcitabine_test$Cell_line_tissue_type == 'skin'
gemcitabine_soft_tissue_lines <- gemcitabine_test$Cell_line_tissue_type == 'soft_tissue'
gemcitabine_thyroid_lines <- gemcitabine_test$Cell_line_tissue_type == 'thyroid'
gemcitabine_urogenital_system_lines <- gemcitabine_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
gemcitabine_test_aero_dig_tract_exp <- gemcitabine_rna_seq_test[gemcitabine_aero_dig_tract_lines, ]
gemcitabine_test_aero_dig_tract <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_aero_dig_tract_auc <- sum(gemcitabine_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_bone_exp <- gemcitabine_rna_seq_test[gemcitabine_bone_lines, ]
gemcitabine_test_bone <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_bone_auc <- sum(gemcitabine_test_bone$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_breast_exp <- gemcitabine_rna_seq_test[gemcitabine_breast_lines, ]
gemcitabine_test_breast <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_breast_auc <- sum(gemcitabine_test_breast$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_digestive_system_exp <- gemcitabine_rna_seq_test[gemcitabine_digestive_system_lines, ]
gemcitabine_test_digestive_system <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_digestive_system_auc <- sum(gemcitabine_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_kidney_exp <- gemcitabine_rna_seq_test[gemcitabine_kidney_lines, ]
gemcitabine_test_kidney <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_kidney_auc <- sum(gemcitabine_test_kidney$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_large_intestine_exp <- gemcitabine_rna_seq_test[gemcitabine_large_intestine_lines, ]
gemcitabine_test_large_intestine <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_large_intestine_auc <- sum(gemcitabine_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_lung_exp <- gemcitabine_rna_seq_test[gemcitabine_lung_lines, ]
gemcitabine_test_lung <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_lung_auc <- sum(gemcitabine_test_lung$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_lung_NSCLC_exp <- gemcitabine_rna_seq_test[gemcitabine_lung_NSCLC_lines, ]
gemcitabine_test_lung_NSCLC <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_lung_NSCLC_auc <- sum(gemcitabine_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_lung_SCLC_exp <- gemcitabine_rna_seq_test[gemcitabine_lung_SCLC_lines, ]
gemcitabine_test_lung_SCLC <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_lung_SCLC_auc <- sum(gemcitabine_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_nervous_system_exp <- gemcitabine_rna_seq_test[gemcitabine_nervous_system_lines, ]
gemcitabine_test_nervous_system <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_nervous_system_auc <- sum(gemcitabine_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_neuroblastoma_exp <- gemcitabine_rna_seq_test[gemcitabine_neuroblastoma_lines, ]
gemcitabine_test_neuroblastoma <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_neuroblastoma_auc <- sum(gemcitabine_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_pancreas_exp <- gemcitabine_rna_seq_test[gemcitabine_pancreas_lines, ]
gemcitabine_test_pancreas <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_pancreas_auc <- sum(gemcitabine_test_pancreas$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_skin_exp <- gemcitabine_rna_seq_test[gemcitabine_skin_lines, ]
gemcitabine_test_skin <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_skin_auc <- sum(gemcitabine_test_skin$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_soft_tissue_exp <- gemcitabine_rna_seq_test[gemcitabine_soft_tissue_lines, ]
gemcitabine_test_soft_tissue <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'soft_tissue'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_soft_tissue_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_soft_tissue_auc <- sum(gemcitabine_test_soft_tissue$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_thyroid_exp <- gemcitabine_rna_seq_test[gemcitabine_thyroid_lines, ]
gemcitabine_test_thyroid <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'thyroid'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_thyroid_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_thyroid_auc <- sum(gemcitabine_test_thyroid$res_sens == new_ic50)/length(new_ic50)
gemcitabine_test_urogenital_system_exp <- gemcitabine_rna_seq_test[gemcitabine_urogenital_system_lines, ]
gemcitabine_test_urogenital_system <- gemcitabine_test[which(gemcitabine_test$Cell_line_tissue_type == 'urogenital_system'), ]
new_ic50 <- predict(gemcitabine_fit_elnet, newx = as.matrix(gemcitabine_test_urogenital_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
gemcitabine_urogenital_system_auc <- sum(gemcitabine_test_urogenital_system$res_sens == new_ic50)/length(new_ic50)
gemcitabine_auc <- c(gemcitabine_aero_dig_tract_auc, gemcitabine_bone_auc,
gemcitabine_breast_auc, gemcitabine_digestive_system_auc,
gemcitabine_kidney_auc, gemcitabine_large_intestine_auc,
gemcitabine_lung_auc, gemcitabine_lung_NSCLC_auc, gemcitabine_lung_SCLC_auc,
gemcitabine_nervous_system_auc, gemcitabine_neuroblastoma_auc,
gemcitabine_pancreas_auc, gemcitabine_skin_auc,
gemcitabine_soft_tissue_auc, gemcitabine_thyroid_auc,
gemcitabine_urogenital_system_auc)
methotrexate_aero_dig_tract_lines <- methotrexate_test$Cell_line_tissue_type == 'aero_dig_tract'
methotrexate_bone_lines <- methotrexate_test$Cell_line_tissue_type == 'bone'
methotrexate_breast_lines <- methotrexate_test$Cell_line_tissue_type == 'breast'
methotrexate_digestive_system_lines <- methotrexate_test$Cell_line_tissue_type == 'digestive_system'
methotrexate_kidney_lines <- methotrexate_test$Cell_line_tissue_type == 'kidney'
methotrexate_large_intestine_lines <- methotrexate_test$Cell_line_tissue_type == 'large_intestine'
methotrexate_lung_lines <- methotrexate_test$Cell_line_tissue_type == 'lung'
methotrexate_lung_NSCLC_lines <- methotrexate_test$Cell_line_tissue_type == 'lung_NSCLC'
methotrexate_lung_SCLC_lines <- methotrexate_test$Cell_line_tissue_type == 'lung_SCLC'
methotrexate_nervous_system_lines <- methotrexate_test$Cell_line_tissue_type == 'nervous_system'
methotrexate_neuroblastoma_lines <- methotrexate_test$Cell_line_tissue_type == 'neuroblastoma'
methotrexate_pancreas_lines <- methotrexate_test$Cell_line_tissue_type == 'pancreas'
methotrexate_skin_lines <- methotrexate_test$Cell_line_tissue_type == 'skin'
methotrexate_soft_tissue_lines <- methotrexate_test$Cell_line_tissue_type == 'soft_tissue'
methotrexate_thyroid_lines <- methotrexate_test$Cell_line_tissue_type == 'thyroid'
methotrexate_urogenital_system_lines <- methotrexate_test$Cell_line_tissue_type == 'urogenital_system'
#test pan-cancer models against individual cancer types
methotrexate_test_aero_dig_tract_exp <- methotrexate_rna_seq_test[methotrexate_aero_dig_tract_lines, ]
methotrexate_test_aero_dig_tract <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'aero_dig_tract'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_aero_dig_tract_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_aero_dig_tract_auc <- sum(methotrexate_test_aero_dig_tract$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_bone_exp <- methotrexate_rna_seq_test[methotrexate_bone_lines, ]
methotrexate_test_bone <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'bone'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_bone_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_bone_auc <- sum(methotrexate_test_bone$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_breast_exp <- methotrexate_rna_seq_test[methotrexate_breast_lines, ]
methotrexate_test_breast <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'breast'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_breast_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_breast_auc <- sum(methotrexate_test_breast$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_digestive_system_exp <- methotrexate_rna_seq_test[methotrexate_digestive_system_lines, ]
methotrexate_test_digestive_system <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'digestive_system'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_digestive_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_digestive_system_auc <- sum(methotrexate_test_digestive_system$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_kidney_exp <- methotrexate_rna_seq_test[methotrexate_kidney_lines, ]
methotrexate_test_kidney <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'kidney'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_kidney_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_kidney_auc <- sum(methotrexate_test_kidney$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_large_intestine_exp <- methotrexate_rna_seq_test[methotrexate_large_intestine_lines, ]
methotrexate_test_large_intestine <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'large_intestine'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_large_intestine_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_large_intestine_auc <- sum(methotrexate_test_large_intestine$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_lung_exp <- methotrexate_rna_seq_test[methotrexate_lung_lines, ]
methotrexate_test_lung <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'lung'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_lung_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_lung_auc <- sum(methotrexate_test_lung$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_lung_NSCLC_exp <- methotrexate_rna_seq_test[methotrexate_lung_NSCLC_lines, ]
methotrexate_test_lung_NSCLC <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'lung_NSCLC'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_lung_NSCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_lung_NSCLC_auc <- sum(methotrexate_test_lung_NSCLC$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_lung_SCLC_exp <- methotrexate_rna_seq_test[methotrexate_lung_SCLC_lines, ]
methotrexate_test_lung_SCLC <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'lung_SCLC'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_lung_SCLC_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_lung_SCLC_auc <- sum(methotrexate_test_lung_SCLC$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_nervous_system_exp <- methotrexate_rna_seq_test[methotrexate_nervous_system_lines, ]
methotrexate_test_nervous_system <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'nervous_system'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_nervous_system_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_nervous_system_auc <- sum(methotrexate_test_nervous_system$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_neuroblastoma_exp <- methotrexate_rna_seq_test[methotrexate_neuroblastoma_lines, ]
methotrexate_test_neuroblastoma <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'neuroblastoma'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_neuroblastoma_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_neuroblastoma_auc <- sum(methotrexate_test_neuroblastoma$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_pancreas_exp <- methotrexate_rna_seq_test[methotrexate_pancreas_lines, ]
methotrexate_test_pancreas <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'pancreas'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_pancreas_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_pancreas_auc <- sum(methotrexate_test_pancreas$res_sens == new_ic50)/length(new_ic50)
methotrexate_test_skin_exp <- methotrexate_rna_seq_test[methotrexate_skin_lines, ]
methotrexate_test_skin <- methotrexate_test[which(methotrexate_test$Cell_line_tissue_type == 'skin'), ]
new_ic50 <- predict(methotrexate_fit_elnet, newx = as.matrix(methotrexate_test_skin_exp), s = 'lambda.1se', interval = 'conf', type = 'class')
methotrexate_skin_auc <- sum(methotrexate_test_skin$res_sens == new_ic50)/length(new_ic50)