1 Load datasets

library(lme4)
## Loading required package: Matrix
library(boot)
library(ggplot2)
library(gridExtra)
setwd("/Users/nicolasrode/Dropbox/GBS/Article/Dryad/")
getwd()
## [1] "/Users/nicolasrode/Dropbox/GBS/Article/Dryad"
list.files()
##  [1] "DataHoechst.csv"                                                                                      
##  [2] "DataPicogreen.csv"                                                                                    
##  [3] "DNAconcentration_estimation_script_Fig.2-3.Rmd"                                                       
##  [4] "Effect of the number of sample, technical and reading replicate on CVbefore and CVafter (Hoechst).pdf"
##  [5] "Fig. 3 Effect of the number of sample, technical and reading replicate on CVbefore  (Picogreen).pdf"  
##  [6] "Fig. S5 Correlation tissue mass - DNA yield Hoechst vs PicoGreen.pdf"                                 
##  [7] "Fig.1_SEpool_SEindividual.pdf"                                                                        
##  [8] "Fig.2-3.html"                                                                                         
##  [9] "Figure 2 Effect of the number of independent samples from the same individual on CVbefore.pdf"        
## [10] "Figure S1 Estep1-3 Lambda equals 20 or 50.pdf"                                                        
## [11] "Figure S2 Estep1-3 Lambda equals 20 or 50.pdf"                                                        
## [12] "Figure S3 Estep1-3 Multiplicative overdispersion equals 1 or 3.pdf"                                   
## [13] "Figure S4 Vstep1-3 Multiplicative overdispersion equals 1 or 3.pdf"                                   
## [14] "PipetteMetrology.csv"                                                                                 
## [15] "Simulation_script_Fig.1Fig.S1-4.html"                                                                 
## [16] "Simulation_script_Fig.1Fig.S1-4.Rmd"
dataH <- read.table("DataHoechst.csv",header=T,sep=",")
dataP <- read.table("DataPicogreen.csv",header=T,sep=",")

head(dataH)
##   Experiment Sample ReadingPlate mass Concentration
## 1    Hoechst      1            1 43.8      50.78767
## 2    Hoechst      2            1 39.3      58.70137
## 3    Hoechst      3            1 40.7     168.34227
## 4    Hoechst      4            1 40.4      15.67090
## 5    Hoechst      5            1 37.7      46.08732
## 6    Hoechst      6            1 52.1      66.51839
head(dataP)
##   Experiment Sample ReadingPlate mass Concentration
## 1  Picogreen      1            5 43.8      27.32382
## 2  Picogreen      2            5 39.3      34.96390
## 3  Picogreen      3            5 40.7      42.20141
## 4  Picogreen      4            5 40.4      38.85351
## 5  Picogreen      5            5 37.7      12.52912
## 6  Picogreen      6            5 52.1      44.03964
nrow(dataH)
## [1] 448
nrow(dataP)
## [1] 560

2 Graphical exploration for Hoechst and Picogreen

hoechst <- tapply(dataH$Concentration,dataH$Sample,mean)
picogreen <- tapply(dataP$Concentration,dataP$Sample,mean)

plot(hoechst,picogreen,xlab="DNA concentration quantified with Hoechst (ng/uL)",ylab="DNA concentration quantified with Picrogreen (ng/uL) ",las=1,bty="n",xlim=c(0,120),ylim=c(0,120),pch=16)
abline(0,1,lty=2,lwd=1)