logical subscript too long in normalizeRobustSpline
1
0
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")
Normalization Normalization • 1.5k views
ADD COMMENT
0
Entering edit mode
Paul Boutros ▴ 340
@paul-boutros-371
Last seen 10.2 years ago
For anybody who replicates this error: Gordon was right -- I had the array layout mis-set. When using debug, I uncovered a webset on debugging suggestions for R that was pretty helpful: http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/ Paul > -----Original Message----- > From: Gordon K Smyth [mailto:smyth@wehi.EDU.AU] > Sent: Thursday, November 04, 2004 5:26 PM > To: paul.boutros > Cc: bioconductor@stat.math.ethz.ch > Subject: [BioC] logical subscript too long in normalizeRobustSpline > > > I don't know what the problem is. If I was debugging this with > my data I would: > > 1. Identify which array in a multi-array experiment is causing > the error (by subsetting the RG > object given to normalizeWithinArrays()) > > 2. Check that the data for the array is ok, e.g., using summary(RG$R) etc > > 3. Try debug(normalizeRobustSpline), then re-run the > normalization and step through the execution > normlizeRobustSpline() line by line (by typing ENTER) to see > where the error occurs. > > Gordon > > > Tue Nov 2 23:14:50 CET 2004 > > 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 > >
ADD COMMENT

Login before adding your answer.

Traffic: 662 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6