Notes

This figure contains data from many different experiments that were used to optimize the protocol for ORBIT.


Setup packages and plotting for the notebook:

# Check packages
source("../tools/package_setup.R")
# Load packages
library(tidyverse)
library(cowplot)
library(kableExtra)
# Code display options
knitr::opts_chunk$set(tidy.opts=list(width.cutoff=60),tidy=FALSE, echo = TRUE, message=FALSE, warning=FALSE, fig.align="center", fig.retina = 2)
# Load plotting tools
source("../tools/plotting_tools.R")
#Modify the plot theme
theme_set(theme_notebook())

Fig. 2A - Helper plasmid induction conditions

Read in the data.

df_po <- read_csv("../../data/low_throughput_experiments/2022_09_15_PO_bonds_orbit.csv") %>% mutate(eff = Kan_count / LB_count)


df_po
## # A tibble: 12 × 6
##    condition         replicate PO_bonds LB_count Kan_count       eff
##    <chr>                 <dbl> <chr>       <dbl>     <dbl>     <dbl>
##  1 p265                      1 0          740000       550 0.000743 
##  2 p265                      2 0          840000      1140 0.00136  
##  3 p265                      3 0          800000      1510 0.00189  
##  4 p386                      1 2          740000      1140 0.00154  
##  5 p386                      2 2          830000      1500 0.00181  
##  6 p386                      3 2          620000      1670 0.00269  
##  7 p387                      1 4          610000       930 0.00152  
##  8 p387                      2 4          540000      1170 0.00217  
##  9 p387                      3 4          500000      1100 0.0022   
## 10 pInt only control         1 control    720000        40 0.0000556
## 11 pInt only control         2 control    710000        19 0.0000268
## 12 pInt only control         3 control    780000        26 0.0000333
po_control <- mean((df_po %>% filter(PO_bonds == 'control'))$eff)

plot_po <- ggplot(df_po %>% filter(PO_bonds != 'control'), aes(x = factor(PO_bonds), y = eff)) + 
  geom_hline(yintercept = po_control, color = 'light gray', linetype = 2) + 
  geom_jitter(shape = 21, width = 0.1, height = 0) +
  stat_summary(geom = 'point', fun = 'mean')+
  scale_y_continuous(labels = scales::label_percent(accuracy = 0.01))+
  #scale_y_log10(breaks = c(0.0001, 0.001, 0.01), limits = c(0.00003, 0.01), labels = scales::label_percent(accuracy = 0.01))+
  scale_x_discrete(labels = c('none', "2x 5' PO", "2x 5' PO\n2x 3' PO"))+
  labs(x = 'Targeting oligo PO bonds', y = 'Efficiency')+
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

plot_po

df_pur <- read_csv("../../data/low_throughput_experiments/2022_09_07_TO_purification.csv") %>% mutate(eff = Kan_count / LB_count) %>% 
  mutate(purification = factor(purification, levels  = c('desalt','cartridge','HPLC','PAGE','control')))

df_pur
## # A tibble: 10 × 6
##    condition               purification replicate LB_count Kan_count       eff
##    <chr>                   <fct>            <dbl>    <dbl>     <dbl>     <dbl>
##  1 p265                    desalt               1   640000       800 0.00125  
##  2 p265                    desalt               2   680000       700 0.00103  
##  3 p395 cartridge purified cartridge            1   640000       620 0.000969 
##  4 p395 cartridge purified cartridge            2   560000      1110 0.00198  
##  5 p396 HPLC purified      HPLC                 1   730000      1090 0.00149  
##  6 p396 HPLC purified      HPLC                 2   490000       880 0.00180  
##  7 p397 PAGE purified      PAGE                 1   600000      1550 0.00258  
##  8 p397 PAGE purified      PAGE                 2   690000      2000 0.00290  
##  9 pInt only               control              1   770000        18 0.0000234
## 10 pInt only               control              2   970000        28 0.0000289
pur_control <- mean((df_pur %>% filter(purification == 'control'))$eff)

plot_pur <- ggplot(df_pur %>% filter(purification != 'control'), aes(x = purification, y = eff)) + 
  geom_hline(yintercept = pur_control, color = 'light gray', linetype = 2) + 
  geom_jitter(shape = 21, width = 0.1, height = 0) +
  stat_summary(geom = 'point', fun = 'mean')+
  scale_y_continuous(labels = scales::label_percent(accuracy = 0.01))+
  #scale_y_log10(breaks = c(0.0001, 0.001, 0.01), limits = c(0.00002, 0.01), labels = scales::label_percent(accuracy = 0.01))+
  #scale_x_discrete(labels = c('none', "2x 5' PO", "2x 5' PO + 2x 3' PO"))+
  labs(x = 'Targeting oligo purification method', y = 'Efficiency')+
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

plot_pur

df_co <- read_csv("../../data/low_throughput_experiments/2022_10_10_oligo_supplier.csv") %>% mutate(eff = Kan_count / LB_count)  %>% 
  mutate(locus = factor(locus, levels  = c('galK','hisA','metA','leuD'))) %>% 
  group_by(supplier, locus) %>% 
  mutate(avg_eff = mean(eff))
  

df_co
## # A tibble: 24 × 9
## # Groups:   supplier, locus [12]
##    condition    supplier locus replica…¹ targe…² LB_co…³ Kan_c…⁴     eff avg_eff
##    <chr>        <chr>    <fct>     <dbl> <chr>     <dbl>   <dbl>   <dbl>   <dbl>
##  1 galK - IDT   IDT      galK          1 p177    1070000     910 8.50e-4 1.01e-3
##  2 galK - IDT   IDT      galK          2 p177    1170000    1380 1.18e-3 1.01e-3
##  3 hisA - IDT   IDT      hisA          1 p229    1250000     240 1.92e-4 1.28e-4
##  4 hisA - IDT   IDT      hisA          2 p229    1570000     100 6.37e-5 1.28e-4
##  5 metA - IDT   IDT      metA          1 p230    1010000      30 2.97e-5 5.84e-5
##  6 metA - IDT   IDT      metA          2 p230    1000000      87 8.7 e-5 5.84e-5
##  7 leuD - IDT   IDT      leuD          1 p231    1310000     107 8.17e-5 7.80e-5
##  8 leuD - IDT   IDT      leuD          2 p231    1210000      90 7.44e-5 7.80e-5
##  9 galK - Sigma Sigma    galK          1 p264    1250000     260 2.08e-4 5.33e-4
## 10 galK - Sigma Sigma    galK          2 p264    1060000     910 8.58e-4 5.33e-4
## # … with 14 more rows, and abbreviated variable names ¹​replicates,
## #   ²​targeting_oligo, ³​LB_count, ⁴​Kan_count
plot_co <- ggplot(df_co, aes(x = supplier, y = eff, color = locus, group = locus)) + 
  geom_jitter(shape = 21, width = 0.1, height = 0, alpha = 0.4) +
  geom_point(aes(y = avg_eff))+
  geom_line(aes(y = avg_eff))+
  #scale_y_continuous(labels = scales::label_percent(accuracy = 0.01))+
  scale_y_log10( labels = scales::label_percent(accuracy = 0.001))+
  scale_color_viridis_d()+
  labs(x = 'Targeting oligo supplier', y = 'Efficiency')+
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

plot_co

theme_set(theme_figure())

supp_protocol <- plot_grid(plot_po, plot_pur, plot_co + guides(color = 'none'), nrow = 1, 
                   align = 'hv', axis = 'lr', scale = 1.0,
                   labels = 'AUTO')

supp_protocol

#save_plot("../../figures/r_pdf_figs/supp_figs/supp_protocol_optimization.pdf", plot = supp_protocol, base_height = 3, base_width = 7)
sessionInfo()
## R version 4.2.0 (2022-04-22)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur/Monterey 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] ggrastr_1.0.1     kableExtra_1.3.4  cowplot_1.1.1     viridis_0.6.2    
##  [5] viridisLite_0.4.1 knitr_1.41        forcats_0.5.2     stringr_1.5.0    
##  [9] dplyr_1.1.0       purrr_0.3.5       readr_2.1.3       tidyr_1.2.1      
## [13] tibble_3.1.8      ggplot2_3.4.0     tidyverse_1.3.2  
## 
## loaded via a namespace (and not attached):
##  [1] httr_1.4.4          sass_0.4.4          bit64_4.0.5        
##  [4] vroom_1.6.0         jsonlite_1.8.3      modelr_0.1.10      
##  [7] bslib_0.4.1         assertthat_0.2.1    highr_0.9          
## [10] vipor_0.4.5         googlesheets4_1.0.1 cellranger_1.1.0   
## [13] yaml_2.3.6          pillar_1.8.1        backports_1.4.1    
## [16] glue_1.6.2          digest_0.6.30       rvest_1.0.3        
## [19] colorspace_2.0-3    htmltools_0.5.4     pkgconfig_2.0.3    
## [22] broom_1.0.1         haven_2.5.1         scales_1.2.1       
## [25] webshot_0.5.4       svglite_2.1.0       tzdb_0.3.0         
## [28] timechange_0.1.1    googledrive_2.0.0   farver_2.1.1       
## [31] generics_0.1.3      ellipsis_0.3.2      cachem_1.0.6       
## [34] withr_2.5.0         cli_3.4.1           magrittr_2.0.3     
## [37] crayon_1.5.2        readxl_1.4.1        evaluate_0.18      
## [40] fs_1.5.2            fansi_1.0.3         xml2_1.3.3         
## [43] beeswarm_0.4.0      tools_4.2.0         hms_1.1.2          
## [46] gargle_1.2.1        lifecycle_1.0.3     munsell_0.5.0      
## [49] reprex_2.0.2        compiler_4.2.0      jquerylib_0.1.4    
## [52] systemfonts_1.0.4   rlang_1.1.1         grid_4.2.0         
## [55] rstudioapi_0.14     labeling_0.4.2      rmarkdown_2.18     
## [58] gtable_0.3.1        DBI_1.1.3           R6_2.5.1           
## [61] gridExtra_2.3       lubridate_1.9.0     fastmap_1.1.0      
## [64] bit_4.0.5           utf8_1.2.2          stringi_1.7.8      
## [67] ggbeeswarm_0.7.1    parallel_4.2.0      vctrs_0.5.2        
## [70] dbplyr_2.2.1        tidyselect_1.2.0    xfun_0.35