-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOS.R
82 lines (63 loc) · 2.55 KB
/
OS.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
# Multi-parameter modeling of overall survival in the TCGA and GSE16560 cohorts
# with log2 expression values of the collagen-related genes
# tools -------
library(tidyverse)
library(rlang)
library(trafo)
library(stringi)
library(glmnet)
library(survivalsvm)
library(randomForestSRC)
library(gbm)
library(caret)
library(survival)
library(survminer)
library(coxExtensions)
library(kmOptimizer)
library(furrr)
library(soucer)
library(ggtext)
explore <- exda::explore
select <- dplyr::select
reduce <- purrr::reduce
set_rownames <- trafo::set_rownames
c('./tools/globals.R',
'./tools/functions.R',
'./tools/svm_tools.R') %>%
source_all(message = TRUE, crash = TRUE)
# analysis globals --------
insert_msg('Analysis globals')
c('./OS scripts/globals.R') %>%
source_all(message = TRUE, crash = TRUE)
# Multi-parameter modeling of overall survival ------
insert_msg('Multi-parameter modeling of overall survival')
## tuning, training, predictions, and evaluation of performance of
## ML models of BCR-free survival
list(cache_path = c('./cache/elnet_os.RData',
'./cache/ridge_os.RData',
'./cache/lasso_os.RData',
'./cache/svm_os.RData',
'./cache/svm_osimp.RData',
'./cache/rf_os.RData',
'./cache/gbm_os.RData'),
script_path = c('./OS scripts/elastic_net.R',
'./OS scripts/ridge.R',
'./OS scripts/lasso.R',
'./OS scripts/svm_survival.R',
'./OS scripts/svm_importance.R',
'./OS scripts/rf.R',
'./OS scripts/gbm.R'),
message = c('Loading chached results of Elastic Net Cox modeling',
'Loading chached results of Ridge Cox modeling',
'Loading chached results of LASSO Cox modeling',
'Loading cached results of SVM modeling',
'Loading cached importance testing for the SVM survival score',
'Loading cached results of RF modeling',
'Loading cached results of GBM modeling')) %>%
pwalk(access_cache)
## summary of the modeling results and visualizations
c('./OS scripts/summary.R',
'./OS scripts/plots.R') %>%
source_all(message = TRUE, crash = TRUE)
# END -------
insert_tail()