# chatGPT pull from paper
Op4d <- data.frame(
Train = c(
# CICB → CICB
rep("CA209-538", 9),
rep("2022_Simpson", 9),
rep("2022_Lee", 9),
rep("2021_Andrews", 9),
rep("2017_Frankel", 9),
# PD1 → CICB + PD1
rep("2022_McCulloch", 9),
rep("2022_Lee_PD1", 9),
rep("2018_Matson", 9),
rep("2017_Frankel_PD1", 9)
),
Test = c(
rep(c("CA209-538","2022_Simpson","2022_Lee","2021_Andrews","2017_Frankel",
"2022_McCulloch","2022_Lee_PD1","2018_Matson","2017_Frankel_PD1"), each = 1)
),
bmed = c(
# CICB train → CICB test (5 cols) + CICB→PD1 (4 cols)
1, 0.67, 0.40, 0.78, 0.75, 0.46, 0.44, 0.58, 0.54,
0.57, 1, 0.52, 0.59, 0.59, 0.50, 0.52, 0.42, 0.25,
0.39, 0.64, 1, 0.43, 0.35, 0.36, 0.59, 0.23, 0.61,
0.72, 0.65, 0.52, 1, 0.63, 0.40, 0.41, 0.46, 0.21,
0.62, 0.74, 0.47, 0.65, 1, 0.40, 0.50, 0.40, 0.29,
# PD1 train → CICB test (5 cols) + PD1 test (4 cols)
0.53, 0.29, 0.26, 0.58, 0.55, 1, 0.52, 0.57, 0.64,
0.42, 0.63, 0.66, 0.22, 0.21, 0.58, 1, 0.61, 0.71,
0.42, 0.40, 0.41, 0.39, 0.42, 0.56, 0.48, 1, 0.64,
0.35, 0.33, 0.51, 0.37, 0.30, 0.66, 0.49, 0.65, 1
)
)
Op4d$therapy_train <- ifelse(grepl("McCulloch|Lee_PD1|Matson|Frankel_PD1", Op4d$Train),
"PD1", "CICB")
Op4d$therapy_test <- ifelse(grepl("McCulloch|Lee_PD1|Matson|Frankel_PD1", Op4d$Test),
"PD1", "CICB")
Op4d$Train[grep("McCulloch", Op4d$Train)] = "McCulloch_2022"
Op4d$Test[grep("McCulloch", Op4d$Test)] = "McCulloch_2022"
Op4d$Train[grep("Lee", Op4d$Train)] = "Lee_2022"
Op4d$Test[grep("Lee", Op4d$Test)] = "Lee_2022"
Op4d$Train[grep("Matson", Op4d$Train)] = "Matson_2018"
Op4d$Test[grep("Matson", Op4d$Test)] = "Matson_2018"
Op4d$Train[grep("Frankel", Op4d$Train)] = "Frankel_2017"
Op4d$Test[grep("Frankel", Op4d$Test)] = "Frankel_2017"
Op_ash = Op4d %>% filter(Train %in% study_order,
Test %in% study_order)
Op_ash$plot_value <- Op_ash$bmed
Op_ash$plot_value[Op_ash$bmed == 0] <- NA
Op_ash2 <- Op_ash %>%
filter(Train %in% study_order,
Test %in% study_order) %>%
group_by(therapy_train, therapy_test, Train) %>%
filter(any(!is.na(plot_value))) %>%
ungroup() %>%
group_by(therapy_train, therapy_test, Test) %>%
filter(any(!is.na(plot_value))) %>%
ungroup()
Op_ash2$Train <- factor(Op_ash2$Train, levels = rev(study_order)) # top → bottom
Op_ash2$Test <- factor(Op_ash2$Test, levels = study_order) # left → right
Op_ash2$plot_value <- Op_ash2$bmed
# Original-ish
make_paper_heatmap(Op_ash2)