Skip to content

Commit

Permalink
Updating for capitalization (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
lharr authored Jul 11, 2017
1 parent 971d766 commit 8d9467c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Scripts/gea_paper_figures.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ iterations_df <- iterations_df %>%
iterations_df <- iterations_df %>%
dplyr::mutate(fnr = (false_negative / (true_positive + false_negative)))

method_names <- c("CtrAll", "CtrM", "Fastgreedy", "Infomap", "Multilevel", "Walktrap")

plot_f1 <- function(m, a_min, a_max, iterations_df){
# m = number of paths
# a_min = min percent additional
Expand All @@ -48,7 +50,7 @@ plot_f1 <- function(m, a_min, a_max, iterations_df){
facet_grid(percent_addit ~ percent_path) + ylab("F1 Score") +
theme(axis.title.x = element_blank(), axis.text.x = element_blank(),
axis.ticks.x = element_blank()) +
xlab(" ") + scale_fill_discrete(name = "Method")
xlab(" ") + scale_fill_discrete(name = "Method", labels = method_names)

figure_name <- file.path("Paper_Figs", paste0("f1_boxplots_", m, ".png"))
ggsave(filename = figure_name, plot = p)
Expand All @@ -74,7 +76,7 @@ plot_fnr <- function(m, a_min, a_max, iterations_df){
facet_grid(percent_addit ~ percent_path) + ylab("False Negative Rate") +
theme(axis.title.x = element_blank(), axis.text.x = element_blank(),
axis.ticks.x = element_blank()) +
xlab(" ") + scale_fill_discrete(name = "Method")
xlab(" ") + scale_fill_discrete(name = "Method", labels = method_names)

figure_name <- file.path("Paper_Figs", paste0("fnr_boxplots_", m, ".png"))
ggsave(filename = figure_name, plot = p)
Expand All @@ -95,7 +97,7 @@ plot_fpr <- function(m, a_min, a_max, iterations_df){
facet_grid(percent_addit ~ percent_path) + ylab("False Positive Rate") +
theme(axis.title.x = element_blank(), axis.text.x = element_blank(),
axis.ticks.x = element_blank()) +
xlab(" ") + scale_fill_discrete(name = "Method")
xlab(" ") + scale_fill_discrete(name = "Method", labels = method_names)

figure_name <- file.path("Paper_Figs", paste0("fpr_boxplots_", m, ".png"))
ggsave(filename = figure_name, plot = p)
Expand Down

0 comments on commit 8d9467c

Please sign in to comment.