|
1 | 1 | devtools::load_all(); |
2 | | -res.date <- '2025-01-13'; |
| 2 | +source('config.R') # see project PRAD-000101-MethySubtypes/PrCaMethy/config.R |
3 | 3 |
|
4 | | -discrete.methy <- FALSE; |
5 | 4 | compress <- 'xz'; |
6 | 5 | test.mode <- FALSE; |
7 | 6 |
|
8 | | -path.ml.res <- paste0('/hot/project/disease/ProstateTumor/PRAD-000101-MethySubtypes/output/prediction/', res.date, '_F72-predict-clinical-and-drivers_gene-methy_association-filter_discrete-methy', discrete.methy, '.RData'); |
| 7 | +arg$path.ml.res <- arg$path.ml.res; |
| 8 | +res.date <- regmatches(arg$path.ml.res, regexpr('\\d{4}-\\d{2}-\\d{2}', arg$path.ml.res)); |
9 | 9 | tolerances <- c(0, 0.01, 0.02, 0.03, 0.04, 0.05) # use smallest model within __ of best model |
10 | 10 |
|
11 | 11 | model.size <- lapply( |
12 | 12 | X = seq_along(tolerances), |
13 | 13 | FUN = function(z) { |
14 | 14 | tolerance <- tolerances[z]; |
15 | 15 |
|
16 | | - load(path.ml.res); |
| 16 | + load(arg$path.ml.res); |
17 | 17 |
|
18 | 18 | outcomes <- unique(ml.res.params$outcome); |
19 | 19 |
|
@@ -80,11 +80,11 @@ model.size <- lapply( |
80 | 80 |
|
81 | 81 | mod.id <- which(ml.res.params$outcome == outcome & ml.res.params$top.features == res$top.features); |
82 | 82 |
|
83 | | - file <- file.path(dirname(path.ml.res), paste0(res.date, '_F72-predict-clinical-and-drivers_discrete-methyFALSE_models-', mod.id, '-', outcome, '-', res$top.features, '.RData')); |
| 83 | + file <- file.path(dirname(arg$path.ml.res), paste0(res.date, '_F72-predict-clinical-and-drivers_discrete-methyFALSE_models-', mod.id, '-', outcome, '-', res$top.features, '.RData')); |
84 | 84 |
|
85 | 85 | if (!file.exists(file)) { |
86 | 86 | res.date2 <- as.Date(res.date) - 1; |
87 | | - file <- file.path(dirname(path.ml.res), paste0(res.date2, '_F72-predict-clinical-and-drivers_discrete-methyFALSE_models-', mod.id, '-', outcome, '-', res$top.features, '.RData')); |
| 87 | + file <- file.path(dirname(arg$path.ml.res), paste0(res.date2, '_F72-predict-clinical-and-drivers_discrete-methyFALSE_models-', mod.id, '-', outcome, '-', res$top.features, '.RData')); |
88 | 88 | } |
89 | 89 | stopifnot(file.exists(file)); |
90 | 90 |
|
|
0 commit comments