Closed gwaybio closed 4 years ago
Note that we will update #33 once this is merged
Just one more thing https://github.com/broadinstitute/lincs-cell-painting/blob/cd8b0f7c79611178e430972c2a036645d727f299/consensus/scripts/nbconverted/build-consensus-signatures.py#L140-L154
I'd recommend making compound_replicate_cols
identical to dmso_replicate_cols
by including Metadata_pert_well
. Replicates are only across plates for all but 2 compounds + DMSOs. For DMSO, we do want position information. It would be great to also have this for the two compounds as well.
platemaps <- list.files("../../metadata/2016_04_01_a549_48hr_batch1/platemap/", pattern = "*.txt", full.names = T) %>% map_df(read_tsv)
platemaps %>% mutate(plate_map_name = str_sub(plate_map_name, 15, 17)) %>% mutate(broad_sample = replace_na(broad_sample, "DMSO"), mmoles_per_liter = replace_na(mmoles_per_liter, 0)) %>% rowwise() %>% mutate(broad_sample = ifelse(broad_sample == "DMSO", "DMSO", str_match(broad_sample, "(BRD)-([A-Z]+[0-9]{8})")[[3]])) %>% ungroup() %>% group_by(plate_map_name, broad_sample, mmoles_per_liter) %>% tally() %>% filter(n > 1) %>% ggplot(aes(interaction(broad_sample, round(mmoles_per_liter)), n)) + geom_col() + facet_wrap(~plate_map_name, nrow = 4) + theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
I'd recommend making compound_replicate_cols identical to dmso_replicate_cols by including Metadata_pert_well.
💯 will add next commit
done in 33b8df111414cb0d063db4e746020b4c9e735b95 (plus some added documentation) @shntnu thanks for these suggestions! Ready for another look
In #36, we added DMSO normalized consensus signatures. Here, I add whole-plate normalized consensus signatures.
The file suffixes are as follows:
<BATCH>_consensus_median_dmso.csv.gz
<BATCH>_consensus_modz_dmso.csv.gz
<BATCH>_consensus_median.csv.gz
<BATCH>_consensus_modz.csv.gz