-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup_modelobj.R
26 lines (22 loc) · 1 KB
/
setup_modelobj.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
if (!exists("modelobj")) {
message("Automatically defining modelobj and quantobj")
#modelobj <- "protgroup"
#quantobj <- "protgroup"
modelobj <- "protregroup"
quantobj <- "pepmodstate"
}
modelobjs_df <- msdata[[str_c(modelobj, "s")]]
modelobj_idcol <- str_c(modelobj, "_id")
quantobj_idcol <- str_c(quantobj, "_id")
# FIXME should be done in prepare_data
modelobjs_df$object_id <- modelobjs_df[[modelobj_idcol]]
modelobjs_df$object_label <- modelobjs_df[[str_c(modelobj, "_label")]]
modelobj2protein.df <- msdata[[str_c("protein2", modelobj)]]
modelobj2protein.df$object_id <- modelobj2protein.df[[modelobj_idcol]]
modelobj_suffix <- dplyr::case_when(modelobj == "protgroup" ~ "_pg",
modelobj == "protregroup" ~ "_prg",
modelobj == "ptmn" ~ "_ptmn",
TRUE ~ NA_character_)
global_labu_shift <- get(str_c("global_", quantobj, "_labu_shift"))
obj_labu_min <- get(str_c(quantobj, "_labu_min"))
mscalib <- get(str_c("mscalib_", quantobj))