knitr::opts_chunk$set(message = FALSE)
library(tidyverse) library(rothSGA) dir = params$dir bio_rep_file = file.path(dir, params$bio_rep_file) processed_colonies_file = file.path(dir, params$processed_colonies_file) processed_strains_file = file.path(dir, params$processed_strains_file)
screenmill::annotate(dir, overwrite = params$re_annotate) add_biological_replicates(dir, file = params$bio_rep_file)
screenmill::calibrate(dir, overwrite = params$re_calibrate) screenmill::measure(dir, overwrite = params$re_measure) screenmill::review(dir, overwrite = params$needs_review)
data_all <- screenmill::read_screenmill(dir) %>% left_join(read_csv(bio_rep_file, col_types = cols()), by = c("plate_id", "query_name", "query_id", "group", "position")) %>% exclude_large_colonies(thresh = 1.5) %>% normalize_spatial_effect(of = 'size', death_thresh = 0.25, prefix = 'size_') %>% normalize_plate_effect(of = 'size_spatial_norm', prefix = 'size_spatial_') %>% write_csv(processed_colonies_file) data_bio_reps <- data_all %>% # Custom cisplatin annotation mutate(cisplatin = as.numeric(stringr::str_extract(treatment_id, "(?<=-).*(?=(uM))"))) %>% # Custom aggregation group_by( # Level of aggregation should identify each strain plate_id, bio_replicate, plate, row, column, # Other annotation features date, hours_growth, strain_collection_id, strain_id, gene_id, query_id, treatment_id, strain_name, query_name, cisplatin ) %>% summarise( n_tech = n(), # exclusions have already been removed plate_control_mean = mean(size_spatial_plate_effect), mean_size_norm = mean(size_spatial_plate_norm), median_size_norm = median(size_spatial_plate_norm), sd_size_norm = sd(size_spatial_plate_norm) ) %>% ungroup() %>% write_csv(processed_strains_file)
options(width = 90) devtools::session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.