merge channel function - idea included below
Hi @lmcneill Here's rudimentary something that works as a function to view merged channels. It would need something for DAPI/third channel (and a way to switch any given channel on/off), which I am out of my depth on.
merge_channels <- function(img_path, crop_id, channel1_string = "SYCP3", channel2_string = "MLH3", file_ext = "jpeg", brightness_ch1 = 1, brightness_ch2 = 2) { r <- readImage(paste0(img_path, "/crops/", crop_id, channel1_string,'.',file_ext)) g <- readImage(paste0(img_path, "/crops/", crop_id, channel2_string,'.',file_ext)) merged_channels <- display(rgbImage(rbrightness_ch1, gbrightness_ch2), all = TRUE) return(merged_channels) }
example usage merge_channels(path, "MLH3mouse488_SYCP3mouse647_fancm_fvb_x_fancm_bl6_exon2_876++_VT_021-crop-56-", brightness_ch2 = 5)