Entering edit mode
Paul Boutros
▴
340
@paul-boutros-371
Last seen 10.2 years ago
Hi again,
Getting this error using robustspline normalization in limma:
Error in normalizeRobustSpline(object$M[, j], object$A[, j], layout,
df = df, :
(subscript) logical subscript too long
I'm on:
Win2k SP2
R 2.0
limma 1.8.8
This isn't a general problem with robustspline, as I seem to be able
to get it
to work on other datasets. Any suggestions on how to debug?
Paul
### CODE ###
targets <- readTargets();
files <- targets[,c("FileNameCy3", "FileNameCy5")];
RG <- read.maimages(files, source="imagene");
RG$genes <- readGAL();
BG <- backgroundCorrect(RG, method="edwards", offset=50);
MA.within <- normalizeWithinArrays(BG, layout, method="robustspline");
### OUTPUT ###
Loading required package: MASS
Loading required package: splines
Error in normalizeRobustSpline(object$M[, j], object$A[, j], layout,
df = df, :
(subscript) logical subscript too long
> traceback();
3: normalizeRobustSpline(object$M[, j], object$A[, j], layout, df =
df,
method = robust)
2: switch(method, loess = {
for (j in 1:narrays) {
y <- object$M[, j]
x <- object$A[, j]
w <- weights[, j]
object$M[, j] <- loessFit(y, x, w, span = span, iterations
=
iterations)$residuals
}
}, printtiploess = {
if (is.null(layout))
stop("Layout argument not specified")
ngr <- layout$ngrid.r
ngc <- layout$ngrid.c
nspots <- layout$nspot.r * layout$nspot.c
for (j in 1:narrays) {
spots <- 1:nspots
for (gridr in 1:ngr) for (gridc in 1:ngc) {
y <- object$M[spots, j]
x <- object$A[spots, j]
w <- weights[spots, j]
object$M[spots, j] <- loessFit(y, x, w, span = span,
iterations = iterations)$residuals
spots <- spots + nspots
}
}
}, composite = {
if (is.null(layout))
stop("Layout argument not specified")
if (is.null(controlspots))
stop("controlspots argument not specified")
ntips <- layout$ngrid.r * layout$ngrid.c
nspots <- layout$nspot.r * layout$nspot.c
for (j in 1:narrays) {
y <- object$M[, j]
x <- object$A[, j]
w <- weights[, j]
f <- is.finite(y) & is.finite(x) & is.finite(w)
y[!f] <- NA
fit <- loess(y ~ x, weights = w, span = span, subset =
controlspots,
na.action = na.exclude, degree = 0, surface = "direct",
family = "symmetric", trace.hat = "approximate",
iterations = iterations)
alpha <- global <- y
global[f] <- predict(fit, newdata = x[f])
alpha[f] <- (rank(x[f]) - 1)/sum(f)
spots <- 1:nspots
for (tip in 1:ntips) {
y <- object$M[spots, j]
x <- object$A[spots, j]
w <- weights[spots, j]
local <- loessFit(y, x, w, span = span, iterations =
iterations)
$fitted
object$M[spots, j] <- object$M[spots, j] - alpha[spots]
*
global[spots] - (1 - alpha[spots]) * local
spots <- spots + nspots
}
}
}, robustspline = {
if (is.null(layout))
stop("Layout argument not specified")
for (j in 1:narrays) object$M[, j] <-
normalizeRobustSpline(object$M[,
j], object$A[, j], layout, df = df, method = robust)
})
1: normalizeWithinArrays(BG, layout, method = "robustspline")