#R script to reproduce the chart in Figure 2D.


library (ggplot2)


AUR <- read.csv ("Figure-2-source-data-3.csv")
cols <- ifelse (AUR$Strain_ID == "WT", rgb (255, 255, 255, max = 255), rgb (0, 0, 0, max = 255))


ggplot (AUR, aes (x = reorder (Strain_ID, Average), y = Average)) +

geom_bar (stat = "identity", width = 0.4, fill = cols, col = "black", size = 1) +

geom_errorbar (aes (ymin = AUR$Average, ymax = AUR$Average + AUR$SD), width = 0.1, col = "black", size = 1) +

labs (x = element_blank (), y = expression (bold (paste (OD [750], " normalized RFU")))) +

theme (axis.title.y = element_text (size = 20)) +

scale_y_continuous (expand = c (0, 0), 
                    limits = c (0, 14500), breaks = c (0, 2000, 4000, 6000, 8000, 10000, 12000, 14000),
                    labels = scales::scientific (digits = 2, x = c (0, 2000, 4000, 6000, 8000, 10000, 12000, 14000))) +

theme (axis.text.x = element_text (size = 20, angle = 45, vjust = 0.5, face = "bold", color = "black"),
       axis.text.y = element_text (size = 15)) +

theme (panel.border = element_rect (colour = "black", fill = NA, size = 2), panel.grid.major = element_blank (), panel.background = element_blank (),
       panel.grid.minor = element_blank (), axis.line = element_line (colour = "black")) +

theme (axis.ticks = element_line (size = 2))