library(dplyr)
library(ggplot2)
library(scales)
library(forcats)
Combicomb <- read.csv("20240915_CombiComp_mean.csv", sep = ',', header = TRUE)
Combicomb <- Combicomb %>%
mutate(Bug_name = fct_rev(factor(Bug_name)))
min_l2FC <- min(Combicomb$l2FC, na.rm = TRUE)
max_l2FC <- max(Combicomb$l2FC, na.rm = TRUE)
Combicomb %>%
ggplot(aes(x=compound,y=Bug_name)) +
geom_tile(aes(fill=l2FC), color = "white", lwd = 0.1) +
theme_bw() +
#th +
theme(axis.text.x = element_text(angle = 90,hjust = 1), axis.ticks = element_blank(), panel.grid = element_blank()) +
#scale_fill_gradientn(colors = wes_palette("Zissou1", 10, type = "continuous"), name = bquote(log[2]~'fold change')) +
scale_fill_gradientn(colors = c("darkred", "red", "white", "blue" #,"blue"
),values = rescale(c(min_l2FC, 0, 0.7
)),
name = bquote(log[2]~'fold change'))
#Figure1 b
library(dplyr)
library(ggplot2)
library(scales)
library(forcats)
Combicomb <- read.csv("20240915_CombiComp_mean.csv", sep = ',', header = TRUE)
Combicomb <- Combicomb %>%
mutate(Bug_name = fct_rev(factor(Bug_name)))
min_l2FC <- min(Combicomb$l2FC, na.rm = TRUE)
max_l2FC <- max(Combicomb$l2FC, na.rm = TRUE)
Combicomb %>%
ggplot(aes(x=compound,y=Bug_name)) +
geom_tile(aes(fill=l2FC), color = "white", lwd = 0.1) +
theme_bw() +
#th +
theme(axis.text.x = element_text(angle = 90,hjust = 1), axis.ticks = element_blank(), panel.grid = element_blank()) +
#scale_fill_gradientn(colors = wes_palette("Zissou1", 10, type = "continuous"), name = bquote(log[2]~'fold change')) +
scale_fill_gradientn(colors = c("darkred", "red", "white", "blue" #,"blue"
),values = rescale(c(min_l2FC, 0, 0.7
)),
name = bquote(log[2]~'fold change'))
#Figure1 b
library(dplyr)
library(ggplot2)
library(scales)
library(forcats)
Combicomb <- read.csv("20240915_CombiComp_mean.csv", sep = ',', header = TRUE)
Combicomb <- Combicomb %>%
mutate(Bug_name = fct_rev(factor(Bug_name)))
min_l2FC <- min(Combicomb$l2FC, na.rm = TRUE)
max_l2FC <- max(Combicomb$l2FC, na.rm = TRUE)
Combicomb %>%
ggplot(aes(x=compound,y=Bug_name)) +
geom_tile(aes(fill=l2FC), color = "white", lwd = 0.1) +
theme_bw() +
#th +
theme(axis.text.x = element_text(angle = 90,hjust = 1), axis.ticks = element_blank(), panel.grid = element_blank()) +
#scale_fill_gradientn(colors = wes_palette("Zissou1", 10, type = "continuous"), name = bquote(log[2]~'fold change')) +
scale_fill_gradientn(colors = c("darkred", "red", "white", "blue" #,"blue"
),values = rescale(c(min_l2FC, 0, 0.7
)),
name = bquote(log[2]~'fold change'))
