[BioC] gcrma.bg.transformation missing
Matthew Hannah
Hannah at mpimp-golm.mpg.de
Tue Nov 2 14:19:30 CET 2004
Hi,
This has been asked a few times but I'm unable to find an answer. When
you run
>esetgcrma2 <- gcrma(data, fast=FALSE)
#OR
esetgcrma2 <- justGCRMA(fast=FALSE)
#You get this error
Adjusting for optical effect......Done.
Adjusting for non-specific binding.Error in bg.adjust.fullmodel(pms[,
i], mms[, i], pm.affinities, mm.affinities, :
couldn't find function "gcrma.bg.transformation"
I did some investigating and it seems that gcrma.bg.transformation
called in the last lines of bg.adjust.fullmodel is not a defined
function, whilst gcrma.bg.transformation.fast is. Is there a reason for
this?
This also happens in 1.9 and my previous 2.0 devel, but I've been
waiting for the new release of BioC in case it had been fixed (I'm
running 2.0, 1.5, win2k).
Anyone provide a quick fix?
Cheers,
Matt
> bg.adjust.fullmodel
function (pms, mms, pm.affinities, mm.affinities, index.affinities,
k = 6 * fast + 0.25 * (1 - fast), Q = 0.25, Qmm = 0.5, rho = 0.7,
fast = TRUE)
{
parameters <- bg.parameters.ns(pms[index.affinities], pm.affinities,
mm.affinities)
mu.pm <- vector("numeric", length(pms))
sigma <- vector("numeric", length(pms))
mu.pm[index.affinities] <- parameters$bg.mu
sigma[index.affinities] <- parameters$bg.sigma
parameters <- bg.parameters.ns(mms[index.affinities], mm.affinities,
mm.affinities)
mu.mm <- vector("numeric", length(pms))
mu.mm[index.affinities] <- parameters$bg.mu
if (length(index.affinities) < length(pms)) {
mu.pm[-index.affinities] <- median(mu.pm[index.affinities])
mu.mm[-index.affinities] <- median(mu.mm[index.affinities])
sigma[-index.affinities] <- median(sigma[index.affinities])
}
if (fast) {
bhat <- exp(mu.pm + rho * (log(mms) - mu.mm) + 1/2 *
(1 - rho^2) * sigma^2)
var.y = exp(2 * mu.pm + sigma^2) * (exp(sigma^2) - exp(sigma^2 *
rho^2))
return(gcrma.bg.transformation.fast(pms, bhat, var.y,
k = k))
}
else return(gcrma.bg.transformation(pms, mu.pm + rho * (log(mms) -
mu.mm), sqrt(1 - rho^2) * sigma, k = k))
}
> gcrma.bg.transformation.fast
function (x, bhat, var.y, k)
{
x <- x - bhat
Index <- x > 0
x[!Index] <- 0
alpha <- rep(0, length(x))
xplusk <- x[Index] + k
logxplusk <- log(xplusk)
alpha[Index] <- (logxplusk - log(k)) * (logxplusk - log(k) +
k/xplusk)/((logxplusk - log(k) + k/xplusk)^2 +
var.y[Index]/xplusk^2)
y <- exp(alpha * log(x + k) + (1 - alpha) * log(k))
}
> gcrma.bg.transformation
Error: Object "gcrma.bg.transformation" not found
More information about the Bioconductor
mailing list