#From drive (enrichment.all-Resistant-or-Sensitives_Fus-vs-Control_strains-factored.xlsx) #load excell
library(readxl)
sens <- read_excel("factored.xlsx", sheet = 1)
resistant <- read_excel("factored.xlsx", sheet = 2)
## New names:
## • `` -> `...1`
resistant$`#category` <- resistant$...1
resistant <- resistant[,-1]
#GO Process Result
sens_go_pro <- sens[sens$`#category` == "GO Process",]
resis_go_pro <- resistant[resistant$`#category` == "GO Process",]
ortak_terimler <- intersect(sens_go_pro$`term ID`, resis_go_pro$`term ID`)
ortak_sens <- sens_go_pro[sens_go_pro$`term ID` %in% ortak_terimler, ]
ortak_sens$grup <- "resistant"
ortak_resis <- resis_go_pro[resis_go_pro$`term ID` %in% ortak_terimler, ]
ortak_resis$grup <- "sensitive"
birlesik_go_pro <- rbind(ortak_sens, ortak_resis)
saveRDS(birlesik_go_pro, "~/birlesik_go_pro.rds")
birlesik_go_pro <- readRDS("~/birlesik_go_pro.rds")
#reactable::reactable(birlesik_go_pro)
library(ggplot2)
data <- birlesik_go_pro
ggplot(data, aes(x = grup, y = `term description`, color = `false discovery rate`)) +
geom_point() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", title = "False Discovery Rate by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data <- birlesik_go_pro
ggplot(data, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Observed Gene Count", title = "False Discovery Rate and Observed Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data <- birlesik_go_pro
ggplot(data, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`, alpha = `strength`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
scale_alpha_continuous(range = c(0.5, 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Background Gene Count", alpha = "Strength", title = "False Discovery Rate, Background Gene Count, and Strength by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data <- birlesik_go_pro
ggplot(data, aes(x = grup, y = `term description`, color = strength, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "Strength", size = "Background Gene Count", title = "Strength and Background Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
#GO Function Result
sens_go_func <- sens[sens$`#category` == "GO Function",]
resis_go_func <- resistant[resistant$`#category` == "GO Function",]
ortak_terimler <- intersect(sens_go_func$`term ID`, resis_go_func$`term ID`)
ortak_sens <- sens_go_func[sens_go_func$`term ID` %in% ortak_terimler, ]
ortak_sens$grup <- "resistant"
ortak_resis <- resis_go_func[resis_go_func$`term ID` %in% ortak_terimler, ]
ortak_resis$grup <- "sensitive"
birlesik_go_func <- rbind(ortak_sens, ortak_resis)
saveRDS(birlesik_go_func, "~/birlesik_go_func.rds")
birlesik_go_func <- readRDS("~/birlesik_go_func.rds")
#reactable::reactable(birlesik_go_func)
library(ggplot2)
data_func <- birlesik_go_func
ggplot(data_func, aes(x = grup, y = `term description`, color = `false discovery rate`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", title = "False Discovery Rate by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_func <- birlesik_go_func
ggplot(data_func, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Observed Gene Count", title = "False Discovery Rate and Observed Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_func <- birlesik_go_func
ggplot(data_func, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`, alpha = `strength`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
scale_alpha_continuous(range = c(0.5, 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Background Gene Count", alpha = "Strength", title = "False Discovery Rate, Background Gene Count, and Strength by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_func <- birlesik_go_func
ggplot(data_func, aes(x = grup, y = `term description`, color = strength, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "Strength", size = "Background Gene Count", title = "Strength and Background Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
#GO Component Result
sens_go_comp <- sens[sens$`#category` == "GO Component",]
resis_go_comp <- resistant[resistant$`#category` == "GO Component",]
ortak_terimler_comp <- intersect(sens_go_comp$`term ID`, resis_go_comp$`term ID`)
ortak_sens_comp <- sens_go_comp[sens_go_comp$`term ID` %in% ortak_terimler_comp, ]
ortak_sens_comp$grup <- "resistant"
ortak_resis_comp <- resis_go_comp[resis_go_comp$`term ID` %in% ortak_terimler_comp, ]
ortak_resis_comp$grup <- "sensitive"
birlesik_go_comp <- rbind(ortak_sens_comp, ortak_resis_comp)
saveRDS(birlesik_go_comp, "~/birlesik_go_comp.rds")
birlesik_go_comp <- readRDS("~/birlesik_go_comp.rds")
#reactable::reactable(birlesik_go_comp)
library(ggplot2)
data_comp <- birlesik_go_comp
ggplot(data_comp, aes(x = grup, y = `term description`, color = `false discovery rate`)) +
geom_point() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", title = "False Discovery Rate by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_comp <- birlesik_go_comp
ggplot(data_comp, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Observed Gene Count", title = "False Discovery Rate and Observed Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_comp <- birlesik_go_comp
ggplot(data_comp, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`, alpha = `strength`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
scale_alpha_continuous(range = c(0.5, 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Background Gene Count", alpha = "Strength", title = "False Discovery Rate, Background Gene Count, and Strength by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_comp <- birlesik_go_comp
ggplot(data_comp, aes(x = grup, y = `term description`, color = strength, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "Strength", size = "Background Gene Count", title = "Strength and Background Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
#KEGG Result
sens_kegg <- sens[sens$`#category` == "KEGG",]
resis_kegg <- resistant[resistant$`#category` == "KEGG",]
ortak_terimler_kegg <- intersect(sens_kegg$`term ID`, resis_kegg$`term ID`)
ortak_sens_kegg <- sens_kegg[sens_kegg$`term ID` %in% ortak_terimler_kegg, ]
ortak_sens_kegg$grup <- "resistant"
ortak_resis_kegg <- resis_kegg[resis_kegg$`term ID` %in% ortak_terimler_kegg, ]
ortak_resis_kegg$grup <- "sensitive"
birlesik_kegg <- rbind(ortak_sens_kegg, ortak_resis_kegg)
saveRDS(birlesik_kegg, "~/birlesik_kegg.rds")
birlesik_kegg <- readRDS("~/birlesik_kegg.rds")
#reactable::reactable(birlesik_kegg)
library(ggplot2)
data_kegg <- birlesik_kegg
ggplot(data_kegg, aes(x = grup, y = `term description`, color = `false discovery rate`)) +
geom_point() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", title = "False Discovery Rate by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_kegg <- birlesik_kegg
ggplot(data_kegg, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Observed Gene Count", title = "False Discovery Rate and Observed Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_kegg <- birlesik_kegg
ggplot(data_kegg, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`, alpha = `strength`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
scale_alpha_continuous(range = c(0.5, 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Background Gene Count", alpha = "Strength", title = "False Discovery Rate, Background Gene Count, and Strength by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_kegg <- birlesik_kegg
ggplot(data_kegg, aes(x = grup, y = `term description`, color = strength, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "Strength", size = "Background Gene Count", title = "Strength and Background Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
#InterPro Result
sens_interpro <- sens[sens$`#category` == "InterPro",]
resis_interpro <- resistant[resistant$`#category` == "InterPro",]
ortak_terimler_interpro <- intersect(sens_interpro$`term ID`, resis_interpro$`term ID`)
ortak_sens_interpro <- sens_interpro[sens_interpro$`term ID` %in% ortak_terimler_interpro, ]
ortak_sens_interpro$grup <- "resistant"
ortak_resis_interpro <- resis_interpro[resis_interpro$`term ID` %in% ortak_terimler_interpro, ]
ortak_resis_interpro$grup <- "sensitive"
birlesik_interpro <- rbind(ortak_sens_interpro, ortak_resis_interpro)
saveRDS(birlesik_interpro, "~/birlesik_interpro.rds")
birlesik_interpro <- readRDS("~/birlesik_interpro.rds")
#reactable::reactable(birlesik_interpro)
library(ggplot2)
data_interpro <- birlesik_interpro
ggplot(data_interpro, aes(x = grup, y = `term description`, color = `false discovery rate`)) +
geom_point() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", title = "False Discovery Rate by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_interpro <- birlesik_interpro
ggplot(data_interpro, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Observed Gene Count", title = "False Discovery Rate and Observed Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_interpro <- birlesik_interpro
ggplot(data_interpro, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`, alpha = `strength`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
scale_alpha_continuous(range = c(0.5, 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Background Gene Count", alpha = "Strength", title = "False Discovery Rate, Background Gene Count, and Strength by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_interpro <- birlesik_interpro
ggplot(data_interpro, aes(x = grup, y = `term description`, color = strength, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "Strength", size = "Background Gene Count", title = "Strength and Background Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
sens_pubmed <- sens[sens$`#category` == "PUBMED",]
resis_pubmed <- resistant[resistant$`#category` == "PUBMED",]
ortak_terimler_pubmed <- intersect(sens_pubmed$`term ID`, resis_pubmed$`term ID`)
ortak_sens_pubmed <- sens_pubmed[sens_pubmed$`term ID` %in% ortak_terimler_pubmed, ]
ortak_sens_pubmed$grup <- "resistant"
ortak_resis_pubmed <- resis_pubmed[resis_pubmed$`term ID` %in% ortak_terimler_pubmed, ]
ortak_resis_pubmed$grup <- "sensitive"
birlesik_pubmed <- rbind(ortak_sens_pubmed, ortak_resis_pubmed)
saveRDS(birlesik_pubmed, "~/birlesik_pubmed.rds")
birlesik_pubmed <- readRDS("~/birlesik_pubmed.rds")
#reactable::reactable(birlesik_pubmed)
library(ggplot2)
data_pubmed <- birlesik_pubmed
ggplot(data_pubmed, aes(x = grup, y = `term description`, color = `false discovery rate`)) +
geom_point() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", title = "False Discovery Rate by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_pubmed <- birlesik_pubmed
ggplot(data_pubmed, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Observed Gene Count", title = "False Discovery Rate and Observed Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_pubmed <- birlesik_pubmed
ggplot(data_pubmed, aes(x = grup, y = `term description`, color = `false discovery rate`, size = `background gene count`, alpha = `strength`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
scale_alpha_continuous(range = c(0.5, 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "False Discovery Rate", size = "Background Gene Count", alpha = "Strength", title = "False Discovery Rate, Background Gene Count, and Strength by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")
library(ggplot2)
data_pubmed <- birlesik_pubmed
ggplot(data_pubmed, aes(x = grup, y = `term description`, color = strength, size = `background gene count`)) +
geom_point() +
scale_size_continuous(range = c(2, 6)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = "Grup", y = "Term Description", color = "Strength", size = "Background Gene Count", title = "Strength and Background Gene Count by Term Description and Group") +
scale_color_gradient(low = "green", high = "red")