Skip to content

Commit

Permalink
changed figure details
Browse files Browse the repository at this point in the history
  • Loading branch information
smuellerd committed Jun 28, 2024
1 parent 5a01a77 commit 61b55d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ kin_list <- map(prior, function(df){
})
kin_comb <- make_comb_mat(kin_list)

pdf(upset_kin, width = 6, height = 3)
pdf(upset_kin, width = 5, height = 3)
UpSet(kin_comb, pt_size = unit(2, "mm"), lwd = 1)
dev.off()

Expand All @@ -173,7 +173,7 @@ edge_list <- map(prior, function(df){
})
edge_comb <- make_comb_mat(edge_list)

pdf(upset_edge, width = 6, height = 3)
pdf(upset_edge, width = 5.5, height = 3)
UpSet(edge_comb, pt_size = unit(2, "mm"), lwd = 1)
dev.off()

Expand Down Expand Up @@ -279,7 +279,7 @@ kintype_p <- ggplot(kin_type, aes(x = resource, y = n, fill = kinase)) +
text = element_text(size = 10),
legend.key.size = unit(0.2, 'cm'))

pdf(kintype_pdf, height = 3, width = 4.5)
pdf(kintype_pdf, height = 3, width = 4.2)
kintype_p
dev.off()

Expand All @@ -303,7 +303,7 @@ regulonsize_p <- ggplot(set_size, aes(x = prior, y = n_targets)) +
text = element_text(size = 10),
legend.key.size = unit(0.2, 'cm'))

pdf(regulonsize_pdf, height = 3, width = 3)
pdf(regulonsize_pdf, height = 3, width = 2.8)
regulonsize_p
dev.off()

14 changes: 12 additions & 2 deletions workflow/scripts/05_figures_manuscript/03_figure_benchmark.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ med_mat <- bench_df %>%
column_to_rownames("net")
med_mat

col_fun = colorRamp2(c(min(med_mat, na.rm = T), max(med_mat, na.rm = T)), c("white", "deeppink4"))
col_fun = colorRamp2(
c(min(med_mat, na.rm = TRUE), mean(unlist(as.vector(med_mat)), na.rm = TRUE), max(med_mat, na.rm = TRUE)),
c("white", "#edcac6", "#7F0863")
)

#col_fun = colorRamp2(c(min(med_mat, na.rm = T), max(med_mat, na.rm = T)), c("white", "deeppink4"))
column_ha = HeatmapAnnotation(mean_method = colMeans(med_mat, na.rm = T), col = list(mean_method = col_fun))
row_ha = rowAnnotation(mean_prior = rowMeans(med_mat, na.rm = T), col = list(mean_prior = col_fun))

Expand Down Expand Up @@ -183,7 +188,12 @@ medRank_mat <- rank_df %>%
column_to_rownames("prior")
medRank_mat

col_fun = colorRamp2(c(min(medRank_mat), max(medRank_mat)), c("deepskyblue4", "white"))
col_fun = colorRamp2(
c(min(medRank_mat, na.rm = TRUE), mean(unlist(as.vector(medRank_mat)), na.rm = TRUE), max(medRank_mat, na.rm = TRUE)),
c("#4770b2", "#d6e2f2", "white")
)

#col_fun = colorRamp2(c(min(medRank_mat), max(medRank_mat)), c("deepskyblue4", "white"))
column_ha = HeatmapAnnotation(mean_method = colMeans(medRank_mat, na.rm = T), col = list(mean_method = col_fun))
row_ha = rowAnnotation(mean_prior = rowMeans(medRank_mat, na.rm = T), col = list(mean_prior = col_fun))

Expand Down

0 comments on commit 61b55d7

Please sign in to comment.