[BioC] limma: normalizeWithinArrays using composite method

paul.boutros at utoronto.ca paul.boutros at utoronto.ca
Thu Aug 21 23:04:19 MEST 2003


Hello,

One question about normalizeWithinArrays(method="composite") function.  I am 
getting an error with this method indicating I'm passing invalid values.  The 
error and traceback are below.

The function predLoess seems to be in modreg, but I couldn't find much detail 
on it.  I'm not sure if this is aproblem with passing in values where R - Rb < 
0 (which is the case for some of my data, and which I could filter out), or if 
there is some way to handle this?  Any suggestions much appreciated.

R      1.7.1
limma  1.1.10
OS     WinXP

Paul

### BEGIN SCREEN DUMP
> MA.within   <- normalizeWithinArrays(RG, layout, method="composite");
Error in predLoess(object$y, object$x, newx, object$s, object$weights,  :
        NA/NaN/Inf in foreign function call (arg 3)
Execution halted

> traceback();
5: predLoess(object$y, object$x, newx, object$s, object$weights, 
       object$pars$robust, object$pars$span, object$pars$degree, 
       object$pars$normalize, object$pars$parametric, object$pars$drop.square, 
       object$pars$surface, object$pars$cell, object$pars$family, 
       object$kd, object$divisor, se = se)
4: predict.loess(fit, newdata = x)
3: predict(fit, newdata = x)
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")
       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]
           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)
           global <- predict(fit, newdata = x)
           alpha <- (rank(x) - 1)/sum(!is.na(x))
           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(RG, layout, method = "composite")
### END SCREEN DUMP



More information about the Bioconductor mailing list