Load data and packages

dir_output_tmp <- ("/project2/gilad/joycehsiao/fucci-seq/output_tmp")
nuclei_table <- readRDS(paste0(dir_output_tmp, "/", "nuclei_table.rds"))

with(nuclei_table, table(nnuclei))
## nnuclei
##    0    1    2    3    4    5    6    7    8   12   20 
##    4 1264  141   53   21   14    2    2    2    1    1

Visual inspection confirmed multiple nuclei.

nuclei_table[which(nuclei_table$nnuclei == 12),]
##         nnuclei  well       plate
## 0004811      12 00048 19160_18870
nuclei_table[which(nuclei_table$nnuclei == 20),]
##        nnuclei  well       plate
## 000636      20 00063 18870_19160

Examples with two nuclei

Print images for all that have two nuclei in plate 18511_18855 and save them in scratch.

cases <- nuclei_table[which(nuclei_table$nnuclei == 2 & nuclei_table$plate == "18511_18855"),]

# print doubles
wells <- as.character(cases$well)
wells <- c("00012","00032","00044","00047","00051","00052","00067","00076","00085","00088","00096")
#wells <- sprintf("%05d", c(1:96))
print(wells)
##  [1] "00012" "00032" "00044" "00047" "00051" "00052" "00067" "00076"
##  [9] "00085" "00088" "00096"
# for printing wells only
test <- lapply(1:length(wells), function(index) {
  id <- wells[index]
  dir_images_data_pl="/project2/gilad/fucci-seq/images_curated/18511_18855/"
  dir_output="/scratch/midway2/joycehsiao/fucci-seq/images_processed/18511_18855/"
  bright <- readImage(paste0(dir_images_data_pl, "BRIGHT/", id, ".TIFF"))
  dapi <- readImage(paste0(dir_images_data_pl, "DAPI/", id, ".TIFF"))
  gfp <- readImage(paste0(dir_images_data_pl, "GFP/", id, ".TIFF"))
  rfp <- readImage(paste0(dir_images_data_pl, "RFP/", id, ".TIFF"))
  tmp <- create_mask(bright, dapi, gfp, rfp, id, 
                     control=list(medianFilterRadius=10,
                                     size_cutoff=200, display=FALSE,
                                     printWholeDAPI=TRUE,
                                     printProcessedImages=FALSE,
                                     displayProcessedImages=FALSE),
                     dir_output = dir_output)
  return(tmp)
})
00012

00032

00044

00047

00051

00052

00067

00076

00085

00088

00096

```


This R Markdown site was created with workflowr