Last updated: 2017-12-11

Code version: 431c2de

Load data

Load nuclei detection results directly from image analysis output /project2/gilad/fucci-seq/intensities. The results are made into a summary table.

plate: labeled by the mix of individual cell lines
well: labels assigned by the JULI imaging system. These will be converted to correspond to C1 plate labels (rows and columns).
nnuclei: number of nuclei detected in a single cell sample

nuclei_table <- readRDS("/project2/gilad/joycehsiao/fucci-seq/output/image-qc.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 

Inspect samples with 12 nuclei.

nuclei_table[which(nuclei_table$nnuclei == 12),]
              plate nnuclei image
0004815 19160_18870      12 00048

Inspect samples with 20 nuclei.

nuclei_table[which(nuclei_table$nnuclei == 20),]
             plate nnuclei image
000637 18870_19160      20 00063

Printing images for inspection

This section is for record keeping. All images for samples with more than 1 nucleus detected have been converted to PNG format and stored in /project2/gilad/fucci-seq/images-inspect-multiple-nuclei

The code below will save images in png format at /project2/gilad/fucci-seq/images-inspect-multiple-nuclei.

#' @param wells vector of wells ID (use the format specified above).
#' @param plate plate ID

print_png <- function(plate, wells) {
  for (index in 1:length(wells)) {
    id <- wells[index]
    dir_images_data_pl <- paste0("/project2/gilad/fucci-seq/images_curated/",plate,"/")
    dir_output <- "/project2/gilad/fucci-seq/images-inspect-multiple-nuclei/"
    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"))
    
    writeImage(bright, paste0(dir_output, plate,".",id,".bright.png"))
    writeImage(dapi, paste0(dir_output, plate,".",id,".dapi.png"))
    writeImage(gfp, paste0(dir_output, plate,".",id,".gfp.png"))
    writeImage(rfp, paste0(dir_output, plate,".",id,".rfp.png"))
    # combo <- combine(dapi, bright, gfp, rfp)
    # writeImage(combo, paste0(dir_output, plate,".",id,".combo.png"))
  }
}


plates <- c("18511_18855","18855_19101","18855_19160","18870_18511",
            "18870_18855","18870_19101","18870_19160","19098_18511",
            "19098_18870","19098_19160","19101_18511","19101_19098",
            "19160_18870","18855_19098","19101_19160","19160_18511")

for (index in 1:length(plates)) {
  plate <- plates[index]
  cases <- nuclei_table[which(nuclei_table$nnuclei > 1 & nuclei_table$plate == plate),]
  wells <- as.character(cases$well)
  print_png(plate, wells) 
}

Single cell using manual inspection

The distortion during the sorting makes the shape not as circular, resulting in mis-identification.

18511_18855.00012 18511_18855.00052 18511_18855.00067 18855_19098.00005 18855_19098.00009 18855_19098.00013 18855_19098.00039 18855_19101.00021 18855_19101.00038 18855_19101.00063 18855_19160.00079 18870_18855.00060 18870_19101.00092 18870_19160.00039 19098_18511.00050 19098_18870.00051 19098_18870.00063 19098_19160.00046 19101_19098.00006 19101_19098.00054 19101_19098.00078 19160_18511.00005 19160_18511.00021 19160_18511.00024 19160_18511.00031 19160_18511.00038 19160_18511.00045 19160_18870.00002 19160_18870.00005 19160_18870.00011 19160_18870.00021 19160_18870.00024 19160_18870.00038 19160_18870.00039 19160_18870.00051 19160_18870.00056 19160_18870.00071 19160_18870.00078 19160_18870.00079 19160_18870.00080 19160_18870.00081 19160_18870.00091 19160_18870.00094


Session information

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Scientific Linux 7.2 (Nitrogen)

Matrix products: default
BLAS: /home/joycehsiao/miniconda3/envs/fucci-seq/lib/R/lib/libRblas.so
LAPACK: /home/joycehsiao/miniconda3/envs/fucci-seq/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_3.4.1  backports_1.0.5 magrittr_1.5    rprojroot_1.2  
 [5] tools_3.4.1     htmltools_0.3.6 yaml_2.1.14     Rcpp_0.12.14   
 [9] stringi_1.1.2   rmarkdown_1.6   knitr_1.16      git2r_0.19.0   
[13] stringr_1.2.0   digest_0.6.12   evaluate_0.10.1

This R Markdown site was created with workflowr