Last updated: 2018-04-10

Code version: 77d10d4


Packages

library(Biobase)

Overview

We collected two types of data for each single cell sample: single-cell RNA-seq using C1 plates and FUCCI image intensity data.


FUCCI intensity data

ints <- readRDS(file="../data/intensity.rds")
colnames(ints)
 [1] "plate"                 "image"                
 [3] "size"                  "perimeter"            
 [5] "eccentricity"          "rfp.fore.zoom.mean"   
 [7] "rfp.fore.zoom.median"  "gfp.fore.zoom.mean"   
 [9] "gfp.fore.zoom.median"  "dapi.fore.zoom.mean"  
[11] "dapi.fore.zoom.median" "rfp.back.zoom.mean"   
[13] "rfp.back.zoom.median"  "gfp.back.zoom.mean"   
[15] "gfp.back.zoom.median"  "dapi.back.zoom.mean"  
[17] "dapi.back.zoom.median" "rfp.mean.log10sum"    
[19] "gfp.mean.log10sum"     "dapi.mean.log10sum"   
[21] "rfp.median.log10sum"   "gfp.median.log10sum"  
[23] "dapi.median.log10sum"  "unique"               
[25] "chip_id"              

Sequencing data

eset_filtered <- readRDS("../output/gene-filtering.Rmd/eset-gene-filtering.rds")

Match intensity with sequencing data

We match labels in the intensity data and in the sequencing data. 990 samples are quantified in both datasets.

pdata <- pData(eset_filtered)
pdata$unique <- paste(pdata$image_individual, sprintf("%05d", pdata$image_label), sep="_")

sample_include_bothdata <- intersect(ints$unique, pdata$unique)
length(sample_include_bothdata)
[1] 990

Make a combined eSet object include both FUCCI intensity data and RNA-seq data.

ints_combo <- ints[which(ints$unique %in% sample_include_bothdata), ]

eset_combo <- new("ExpressionSet", 
      exprs = exprs(eset_filtered)[,which(pdata$unique %in% sample_include_bothdata)], 
      phenoData = phenoData(eset_filtered)[which(pdata$unique %in% sample_include_bothdata), ], 
      featureData = featureData(eset_filtered))

pdata_combo <- pData(eset_combo)
pdata_combo$unique <- paste(pdata_combo$image_individual, 
                            sprintf("%05d", pdata_combo$image_label), sep="_")

all.equal(ints_combo$unique, pdata_combo$unique)

Import estimated cell time. Computed using cell times adjusted for plate effect ../output/images-normalize-anova.Rmd/pdata.adj.rds. See ../docs/npreg.html for methods.

theta <- readRDS(file = "../output/npreg.Rmd/theta.rds")

Make variable labels.

pdata_table <- rbind(varMetadata(phenoData(eset_combo)),
                    "mCherry background-corrected intensity (log10sum)",
                    "EGFP background-corrected intensity (log10sum)",
                    "DAPI background-corrected intensity (log10sum)",
                    "nucleus size",
                    "nucleus perimeter",
                    "nucleus eccentricity", 
                    "cell time")
rownames(pdata_table) <- c(rownames(varMetadata(phenoData(eset_combo))),
                           "rfp.median.log10sum",
                           "gfp.median.log10sum",
                           "dapi.median.log10sum",
                           "size", "perimeter", "eccentricity",
                           "theta")


phenoData(eset_combo) <- new("AnnotatedDataFrame", 
  data = data.frame(pData(eset_combo),
  rfp.median.log10sum=ints_combo$rfp.median.log10sum,
  gfp.median.log10sum=ints_combo$gfp.median.log10sum,                               dapi.median.log10sum=ints_combo$dapi.median.log10sum,
  size=ints_combo$size,
  perimeter=ints_combo$perimeter,
  eccentricity=ints_combo$eccentricity,
  theta=theta),
  varMetadata = pdata_table)

saveRDS(eset_combo, file = "../data/eset-final.rds")

Access expressionSets

We store feature-level (gene) read count and molecule count in expressionSet (data/eset) objects, which also contain sample metadata (e.g., assigned indivdual ID, cDNA concentraion) and quality filtering criteria (e.g., number of reads mapped to FUCCI transgenes, ERCC conversion rate). Data from different C1 plates are stored in separate eset objects:

To combine eset objects from the different C1 plates:

eset <- Reduce(combine, Map(readRDS, Sys.glob("data/eset/*.rds")))

To access data stored in expressionSet:


Session information

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

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.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] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] Biobase_2.38.0      BiocGenerics_0.24.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16    digest_0.6.15   rprojroot_1.3-2 backports_1.1.2
 [5] git2r_0.21.0    magrittr_1.5    evaluate_0.10.1 stringi_1.1.7  
 [9] rmarkdown_1.9   tools_3.4.1     stringr_1.3.0   yaml_2.1.18    
[13] compiler_3.4.1  htmltools_0.3.6 knitr_1.20     

This R Markdown site was created with workflowr