From 15215c27b42b8bdc1d144c9f74bca13a7a03c94c Mon Sep 17 00:00:00 2001 From: allanjust Date: Wed, 17 Jan 2018 13:50:25 -0500 Subject: [PATCH] update detectionP in calculating detection p-values add variances instead of standard deviations for parameters of the M+U background distribution based on negative control probes --- R/preprocess.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/preprocess.R b/R/preprocess.R index 9b6b776..ea78d66 100644 --- a/R/preprocess.R +++ b/R/preprocess.R @@ -122,13 +122,13 @@ detectionP <- function(rgSet, type = "m+u") { for (i in 1:ncol(rgSet)) { ## Type I Red intensity <- r[TypeI.Red$AddressA, i] + r[TypeI.Red$AddressB, i] - detP[TypeI.Red$Name, i] <- 1-pnorm(intensity, mean=rMu[i]*2, sd=rSd[i]*2) + detP[TypeI.Red$Name, i] <- 1-pnorm(intensity, mean=rMu[i]*2, sd=rSd[i]*sqrt(2)) ## Type I Green intensity <- g[TypeI.Green$AddressA, i] + g[TypeI.Green$AddressB, i] - detP[TypeI.Green$Name, i] <- 1-pnorm(intensity, mean=gMu[i]*2, sd=gSd[i]*2) + detP[TypeI.Green$Name, i] <- 1-pnorm(intensity, mean=gMu[i]*2, sd=gSd[i]*sqrt(2)) ## Type II intensity <- r[TypeII$AddressA, i] + g[TypeII$AddressA, i] - detP[TypeII$Name, i] <- 1-pnorm(intensity, mean=rMu[i]+gMu[i], sd=rSd[i]+gSd[i]) + detP[TypeII$Name, i] <- 1-pnorm(intensity, mean=rMu[i]+gMu[i], sd=sqrt(rSd[i]^2+gSd[i]^2)) } detP }