[Robast-commits] r464 - in pkg/RobLoxBioC: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 3 23:30:53 CET 2012


Author: stamats
Date: 2012-03-03 23:30:52 +0100 (Sat, 03 Mar 2012)
New Revision: 464

Added:
   pkg/RobLoxBioC/R/robloxbiocBeadLevelData.R
Removed:
   pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R
Modified:
   pkg/RobLoxBioC/DESCRIPTION
   pkg/RobLoxBioC/man/robloxbioc.Rd
Log:
forgot to add signature from BeadLevelList to BeadLevelData

Modified: pkg/RobLoxBioC/DESCRIPTION
===================================================================
--- pkg/RobLoxBioC/DESCRIPTION	2012-03-03 22:18:35 UTC (rev 463)
+++ pkg/RobLoxBioC/DESCRIPTION	2012-03-03 22:30:52 UTC (rev 464)
@@ -5,7 +5,6 @@
 Description: Functions for the determination of optimally robust influence curves and
         estimators for preprocessing omics data, in particular gene expression data.
 Depends: R(>= 2.14.0), methods, Biobase, affy, beadarray, distr, RobLox, lattice, RColorBrewer
-Suggests: beadarrayExampleData
 Author: Matthias Kohl <Matthias.Kohl at stamats.de>
 Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
 LazyLoad: yes

Copied: pkg/RobLoxBioC/R/robloxbiocBeadLevelData.R (from rev 462, pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R)
===================================================================
--- pkg/RobLoxBioC/R/robloxbiocBeadLevelData.R	                        (rev 0)
+++ pkg/RobLoxBioC/R/robloxbiocBeadLevelData.R	2012-03-03 22:30:52 UTC (rev 464)
@@ -0,0 +1,202 @@
+setMethod("robloxbioc", signature(x = "BeadLevelData"),
+    function(x, log = TRUE, imagesPerArray = 1, what = "G", probes = NULL, arrays = NULL,
+             eps = NULL, eps.lower = 0, eps.upper = 0.05, steps = 3L, 
+             fsCor = TRUE, mad0 = 1e-4){
+        BLData <- x
+        arraynms <- sectionNames(BLData)
+        if(!is.null(arrays) && !is.character(arrays)) arraynms <- arraynms[arrays]
+        if(is.character(arrays)) arraynms <- which(arraynms %in% arrays)
+        len <- length(arraynms)
+        what <- match.arg(what, c("G", "R", "RG", "M", "A", "beta"))
+        whatelse <- ""
+        if(what == "RG"){
+            if(BLData at arrayInfo$channels == "two"){
+                what <- "G"
+                whatelse <- "R"
+            }else{
+                stop("Need two-channel data to calculate summary R and G values")
+            }
+        }
+        if(imagesPerArray == 1){
+            pr <- getBeadData(BLData, what = "ProbeID", array = arraynms[1])
+            sel <- pr != 0
+            pr <- pr[sel]
+            finten <- getBeadData(BLData, what = what, array = arraynms[1])[sel]
+            if(log) finten <- log2(finten)
+            nasinf <- !is.finite(finten) | is.na(finten)
+            finten <- finten[!nasinf]
+        }
+        else if(imagesPerArray == 2){
+            if(length(arraynms)%%2 != 0) 
+                stop("Need an even number of arrays when 'imagesPerArray=2'")
+            arrayord <- order(arraynms)
+            arraynms <- arraynms[arrayord]
+            tmp <- unlist(strsplit(arraynms, "_"))
+            chipnums <- tmp[seq(1, length(tmp), by = 3)]
+            pos <- tmp[seq(2, length(tmp), by = 3)]
+            stripnum <- as.numeric(tmp[seq(3, length(tmp), by = 3)])
+            check <- ((chipnums[seq(1, len, by = 2)] == chipnums[seq(2, len, by = 2)]) 
+                      & (pos[seq(1, len, by = 2)] == pos[seq(2, len, by = 2)]) 
+                      & (stripnum[seq(1, len, by = 2)] == stripnum[seq(2, len, by = 2)] - 1))
+            if (sum(check) != length(check)) 
+                stop("Missing arrays")
+            sel1 <- getBeadData(BLData, what = "ProbeID", array = arraynms[1]) != 0
+            sel2 <- getBeadData(BLData, what = "ProbeID", array = arraynms[2]) != 0
+            pr <- append(getBeadData(BLData, what = "ProbeID", array = arraynms[1])[sel1], 
+                         getBeadData(BLData, what = "ProbeID", array = arraynms[2])[sel2])
+            finten <- append(getBeadData(BLData, what = what, array = arraynms[1])[sel1], 
+                             getBeadData(BLData, what = what, array = arraynms[2])[sel2])
+            if(log) finten <- log2(finten)
+            nasinf <- !is.finite(finten) | is.na(finten)
+            finten <- finten[!nasinf]
+        }else{
+            stop("You can only specify 1 or 2 images per array")
+        }
+        if(is.null(probes)) probes <- sort(unique(pr))
+        probes <- probes[probes > 0 & !is.na(probes)]
+        noprobes <- length(probes)
+        pr <- pr[!nasinf]
+        if (imagesPerArray == 1) {
+            G <- GBeadStDev <- GNoBeads <- matrix(0, nrow = noprobes, ncol = len)
+            colnames(G) <- colnames(GBeadStDev) <- colnames(GNoBeads) <- arraynms
+            if (BLData at arrayInfo$channels == "two" && !is.null(BLData[[arraynms[1]]]$R) && whatelse == "R") 
+                R <- RBeadStDev <- RNoBeads <- G
+            else R <- NULL
+        }
+        else if (imagesPerArray == 2) {
+            G <- GBeadStDev <- GNoBeads <- matrix(0, nrow = noprobes, ncol = (len/2))
+            colnames(G) <- colnames(GBeadStDev) <- colnames(GNoBeads) <- arraynms[seq(1, len, by = 2)]
+            if (BLData at arrayInfo$channels == "two" && !is.null(BLData[[arraynms[1]]]$R) && whatelse == "R") 
+                R <- RBeadStDev <- RNoBeads <- G
+            else R <- NULL
+        }
+        i <- j <- 1
+        while (j <= len) {
+            probeIDs <- as.integer(pr)
+            start <- 0
+            blah <- rmxBeadSummary(x = finten, probeIDs = probeIDs, probes = probes, 
+                                   eps = eps, eps.lower = eps.lower, eps.upper = eps.upper, 
+                                   steps = steps, fsCor = fsCor, mad0 = mad0)
+            G[, i] <- blah$fore
+            GBeadStDev[, i] <- blah$sd
+            GNoBeads[, i] <- blah$noBeads
+            if (BLData at arrayInfo$channels == "two" && !is.null(BLData[[arraynms[i]]]$R) && whatelse == "R") {
+                if (imagesPerArray == 1) {
+                    finten <- getBeadData(BLData, what = whatelse, array = arraynms[i])[sel]
+                    if(log) finten <- log2(finten)
+                    nasinf <- !is.finite(finten) | is.na(finten)
+                    finten <- finten[!nasinf]
+                }
+                else if (imagesPerArray == 2) {
+                    finten <- append(getBeadData(BLData, what = whatelse, array = arraynms[j])[sel1], 
+                                     getBeadData(BLData, what = whatelse, array = arraynms[j + 1])[sel2])
+                    if(log) finten <- log2(finten)
+                    nasinf <- !is.finite(finten) | is.na(finten)
+                    finten <- finten[!nasinf]
+                }
+                blah <- rmxBeadSummary(x = finten, probeIDs = probeIDs, probes = probes, 
+                                       eps = eps, eps.lower = eps.lower, eps.upper = eps.upper, 
+                                       steps = steps, fsCor = fsCor, mad0 = mad0)
+                R[, i] <- blah$fore
+                RBeadStDev[, i] <- blah$sd
+                RNoBeads[, i] <- blah$noBeads
+            }
+            j <- j + imagesPerArray
+            i <- i + 1
+            rm(probeIDs, blah)
+            gc()
+            if ((imagesPerArray == 1) && (i <= len)) {
+                sel <- getBeadData(BLData, what = "ProbeID", array = arraynms[i]) != 0
+                pr <- getBeadData(BLData, what = "ProbeID", array = arraynms[i])[sel]
+                finten <- getBeadData(BLData, what = what, array = arraynms[i])[sel]
+                if(log) finten <- log2(finten)
+                nasinf <- !is.finite(finten) | is.na(finten)
+                pr <- pr[!nasinf]
+                finten <- finten[!nasinf]
+            }
+            else if ((imagesPerArray == 2) && (j < len)) {
+                sel1 <- getBeadData(BLData, what = "ProbeID", array = arraynms[j]) != 0
+                sel2 <- getBeadData(BLData, what = "ProbeID", array = arraynms[j + 1]) != 0
+                pr <- append(getBeadData(BLData, what = "ProbeID", array = arraynms[j])[sel1], 
+                             getBeadData(BLData, what = "ProbeID", array = arraynms[j + 1])[sel2])
+                finten <- append(getBeadData(BLData, what = what, array = arraynms[j])[sel1], 
+                                 getBeadData(BLData, what = what, array = arraynms[j + 1])[sel2])
+                if(log) finten <- log2(finten)
+                nasinf <- !is.finite(finten) | is.na(finten)
+                pr <- pr[!nasinf]
+                finten <- finten[!nasinf]
+            }
+        }
+        GBeadStDev <- GBeadStDev/sqrt(GNoBeads)
+        if(!is.null(R)) RBeadStDev <- RBeadStDev/sqrt(RNoBeads)
+        if (whatelse == "R") {
+            rownames(G) <- rownames(R) <- rownames(GBeadStDev) <- rownames(RBeadStDev) <- rownames(GNoBeads) <- rownames(RNoBeads) <- probes
+            BSData <- new("NChannelSet", R = R, G = G, GBeadStDev = GBeadStDev, 
+                          RBeadStDev = RBeadStDev, GNoBeads = GNoBeads, RNoBeads = RNoBeads)
+        }
+        else {
+            BSData <- new("ExpressionSetIllumina")
+            assayData(BSData) <- assayDataNew(exprs = G, se.exprs = GBeadStDev, 
+                                              nObservations = GNoBeads, storage.mode = "list")
+            rownames(exprs(BSData)) <- rownames(se.exprs(BSData)) <- rownames(nObservations(BSData)) <- probes
+            featureData(BSData) <- new("AnnotatedDataFrame", data = data.frame(ProbeID = probes, row.names = probes))
+        }
+        if (nrow(pData(BLData)) == len) {
+            if (imagesPerArray == 2) 
+                BSData at phenoData <- new("AnnotatedDataFrame", data = pData(BLData at phenoData)[arrayord, , drop = FALSE][seq(1, len, by = 2), , drop = FALSE])
+            else BSData at phenoData <- BLData at phenoData
+        }
+        else {
+            BSData at phenoData <- new("AnnotatedDataFrame", data = data.frame(sampleName = colnames(G)))
+        }
+        if (!is.null(pData(BSData)$sampleName)) 
+            sampleNames(BSData) <- pData(BSData)$sampleName
+        else sampleNames(BSData) <- colnames(G)
+        if (whatelse == "R") {
+            varMetadata <- data.frame(labelDescription = colnames(BSData at phenoData@data), channel = "_ALL_")
+            BSData at phenoData <- new("AnnotatedDataFrame", data = data.frame(BSData at phenoData@data), varMetadata = varMetadata)
+        }
+        BSData at annotation <- BLData at annotation
+        if ("qcScores" %in% names(BLData at arrayInfo)) 
+            t <- try(BSData at BeadLevelQC <- BLData at arrayInfo$qcScores, silent = TRUE)
+        BSData
+    })
+## computation of bead summaries via robloxbioc for "matrix"
+rmxBeadSummary <- function(x, probeIDs, probes, eps, eps.lower, eps.upper, steps, fsCor, mad0){
+    comIDs <- intersect(probeIDs, probes)
+    x <- x[probeIDs %in% comIDs]
+    probeIDs <- probeIDs[probeIDs %in% comIDs]
+    noBeads <- as.vector(table(probeIDs))
+    noBeads.uni <- as.integer(names(table(noBeads)))
+    probes1 <- comIDs
+    len1 <- length(probes1)
+    fore1 <- numeric(len1)
+    SD1 <- numeric(len1)
+    for(i in seq(along = noBeads.uni)){
+        index <- noBeads == noBeads.uni[i]
+        IDs <- probes1[index]
+        if(noBeads.uni[i] == 1){
+            fore1[index] <- x[probeIDs %in% IDs]
+            SD1[index] <- mad0
+        }else{
+            temp <- matrix(x[probeIDs %in% IDs], ncol = noBeads.uni[i], byrow = TRUE)
+            rmx <- robloxbioc(temp, eps = eps, eps.lower = eps.lower, eps.upper = eps.upper, 
+                              steps = steps, fsCor = fsCor, mad0 = mad0)
+            fore1[index] <- rmx[,"mean"]
+            SD1[index] <- rmx[,"sd"]
+        }
+    }    
+    len <- length(probes)
+    fore <- numeric(len)
+    SD <- numeric(len)
+    noBeads1 <- numeric(len)
+    nas <- !(probes %in% comIDs)
+    fore[nas] <- NA
+    fore[!nas] <- fore1
+    SD[nas] <- NA
+    SD[!nas] <- SD1
+    noBeads1[nas] <- 0
+    noBeads1[!nas] <- noBeads
+
+    return(list(fore = fore, sd = SD, noBeads = noBeads1))
+}

Deleted: pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R
===================================================================
--- pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R	2012-03-03 22:18:35 UTC (rev 463)
+++ pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R	2012-03-03 22:30:52 UTC (rev 464)
@@ -1,202 +0,0 @@
-setMethod("robloxbioc", signature(x = "BeadLevelList"),
-    function(x, log = TRUE, imagesPerArray = 1, what = "G", probes = NULL, arrays = NULL,
-             eps = NULL, eps.lower = 0, eps.upper = 0.05, steps = 3L, 
-             fsCor = TRUE, mad0 = 1e-4){
-        BLData <- x
-        arraynms <- sectionNames(BLData)
-        if(!is.null(arrays) && !is.character(arrays)) arraynms <- arraynms[arrays]
-        if(is.character(arrays)) arraynms <- which(arraynms %in% arrays)
-        len <- length(arraynms)
-        what <- match.arg(what, c("G", "R", "RG", "M", "A", "beta"))
-        whatelse <- ""
-        if(what == "RG"){
-            if(BLData at arrayInfo$channels == "two"){
-                what <- "G"
-                whatelse <- "R"
-            }else{
-                stop("Need two-channel data to calculate summary R and G values")
-            }
-        }
-        if(imagesPerArray == 1){
-            pr <- getBeadData(BLData, what = "ProbeID", array = arraynms[1])
-            sel <- pr != 0
-            pr <- pr[sel]
-            finten <- getBeadData(BLData, what = what, array = arraynms[1])[sel]
-            if(log) finten <- log2(finten)
-            nasinf <- !is.finite(finten) | is.na(finten)
-            finten <- finten[!nasinf]
-        }
-        else if(imagesPerArray == 2){
-            if(length(arraynms)%%2 != 0) 
-                stop("Need an even number of arrays when 'imagesPerArray=2'")
-            arrayord <- order(arraynms)
-            arraynms <- arraynms[arrayord]
-            tmp <- unlist(strsplit(arraynms, "_"))
-            chipnums <- tmp[seq(1, length(tmp), by = 3)]
-            pos <- tmp[seq(2, length(tmp), by = 3)]
-            stripnum <- as.numeric(tmp[seq(3, length(tmp), by = 3)])
-            check <- ((chipnums[seq(1, len, by = 2)] == chipnums[seq(2, len, by = 2)]) 
-                      & (pos[seq(1, len, by = 2)] == pos[seq(2, len, by = 2)]) 
-                      & (stripnum[seq(1, len, by = 2)] == stripnum[seq(2, len, by = 2)] - 1))
-            if (sum(check) != length(check)) 
-                stop("Missing arrays")
-            sel1 <- getBeadData(BLData, what = "ProbeID", array = arraynms[1]) != 0
-            sel2 <- getBeadData(BLData, what = "ProbeID", array = arraynms[2]) != 0
-            pr <- append(getBeadData(BLData, what = "ProbeID", array = arraynms[1])[sel1], 
-                         getBeadData(BLData, what = "ProbeID", array = arraynms[2])[sel2])
-            finten <- append(getBeadData(BLData, what = what, array = arraynms[1])[sel1], 
-                             getBeadData(BLData, what = what, array = arraynms[2])[sel2])
-            if(log) finten <- log2(finten)
-            nasinf <- !is.finite(finten) | is.na(finten)
-            finten <- finten[!nasinf]
-        }else{
-            stop("You can only specify 1 or 2 images per array")
-        }
-        if(is.null(probes)) probes <- sort(unique(pr))
-        probes <- probes[probes > 0 & !is.na(probes)]
-        noprobes <- length(probes)
-        pr <- pr[!nasinf]
-        if (imagesPerArray == 1) {
-            G <- GBeadStDev <- GNoBeads <- matrix(0, nrow = noprobes, ncol = len)
-            colnames(G) <- colnames(GBeadStDev) <- colnames(GNoBeads) <- arraynms
-            if (BLData at arrayInfo$channels == "two" && !is.null(BLData[[arraynms[1]]]$R) && whatelse == "R") 
-                R <- RBeadStDev <- RNoBeads <- G
-            else R <- NULL
-        }
-        else if (imagesPerArray == 2) {
-            G <- GBeadStDev <- GNoBeads <- matrix(0, nrow = noprobes, ncol = (len/2))
-            colnames(G) <- colnames(GBeadStDev) <- colnames(GNoBeads) <- arraynms[seq(1, len, by = 2)]
-            if (BLData at arrayInfo$channels == "two" && !is.null(BLData[[arraynms[1]]]$R) && whatelse == "R") 
-                R <- RBeadStDev <- RNoBeads <- G
-            else R <- NULL
-        }
-        i <- j <- 1
-        while (j <= len) {
-            probeIDs <- as.integer(pr)
-            start <- 0
-            blah <- rmxBeadSummary(x = finten, probeIDs = probeIDs, probes = probes, 
-                                   eps = eps, eps.lower = eps.lower, eps.upper = eps.upper, 
-                                   steps = steps, fsCor = fsCor, mad0 = mad0)
-            G[, i] <- blah$fore
-            GBeadStDev[, i] <- blah$sd
-            GNoBeads[, i] <- blah$noBeads
-            if (BLData at arrayInfo$channels == "two" && !is.null(BLData[[arraynms[i]]]$R) && whatelse == "R") {
-                if (imagesPerArray == 1) {
-                    finten <- getBeadData(BLData, what = whatelse, array = arraynms[i])[sel]
-                    if(log) finten <- log2(finten)
-                    nasinf <- !is.finite(finten) | is.na(finten)
-                    finten <- finten[!nasinf]
-                }
-                else if (imagesPerArray == 2) {
-                    finten <- append(getBeadData(BLData, what = whatelse, array = arraynms[j])[sel1], 
-                                     getBeadData(BLData, what = whatelse, array = arraynms[j + 1])[sel2])
-                    if(log) finten <- log2(finten)
-                    nasinf <- !is.finite(finten) | is.na(finten)
-                    finten <- finten[!nasinf]
-                }
-                blah <- rmxBeadSummary(x = finten, probeIDs = probeIDs, probes = probes, 
-                                       eps = eps, eps.lower = eps.lower, eps.upper = eps.upper, 
-                                       steps = steps, fsCor = fsCor, mad0 = mad0)
-                R[, i] <- blah$fore
-                RBeadStDev[, i] <- blah$sd
-                RNoBeads[, i] <- blah$noBeads
-            }
-            j <- j + imagesPerArray
-            i <- i + 1
-            rm(probeIDs, blah)
-            gc()
-            if ((imagesPerArray == 1) && (i <= len)) {
-                sel <- getBeadData(BLData, what = "ProbeID", array = arraynms[i]) != 0
-                pr <- getBeadData(BLData, what = "ProbeID", array = arraynms[i])[sel]
-                finten <- getBeadData(BLData, what = what, array = arraynms[i])[sel]
-                if(log) finten <- log2(finten)
-                nasinf <- !is.finite(finten) | is.na(finten)
-                pr <- pr[!nasinf]
-                finten <- finten[!nasinf]
-            }
-            else if ((imagesPerArray == 2) && (j < len)) {
-                sel1 <- getBeadData(BLData, what = "ProbeID", array = arraynms[j]) != 0
-                sel2 <- getBeadData(BLData, what = "ProbeID", array = arraynms[j + 1]) != 0
-                pr <- append(getBeadData(BLData, what = "ProbeID", array = arraynms[j])[sel1], 
-                             getBeadData(BLData, what = "ProbeID", array = arraynms[j + 1])[sel2])
-                finten <- append(getBeadData(BLData, what = what, array = arraynms[j])[sel1], 
-                                 getBeadData(BLData, what = what, array = arraynms[j + 1])[sel2])
-                if(log) finten <- log2(finten)
-                nasinf <- !is.finite(finten) | is.na(finten)
-                pr <- pr[!nasinf]
-                finten <- finten[!nasinf]
-            }
-        }
-        GBeadStDev <- GBeadStDev/sqrt(GNoBeads)
-        if(!is.null(R)) RBeadStDev <- RBeadStDev/sqrt(RNoBeads)
-        if (whatelse == "R") {
-            rownames(G) <- rownames(R) <- rownames(GBeadStDev) <- rownames(RBeadStDev) <- rownames(GNoBeads) <- rownames(RNoBeads) <- probes
-            BSData <- new("NChannelSet", R = R, G = G, GBeadStDev = GBeadStDev, 
-                          RBeadStDev = RBeadStDev, GNoBeads = GNoBeads, RNoBeads = RNoBeads)
-        }
-        else {
-            BSData <- new("ExpressionSetIllumina")
-            assayData(BSData) <- assayDataNew(exprs = G, se.exprs = GBeadStDev, 
-                                              nObservations = GNoBeads, storage.mode = "list")
-            rownames(exprs(BSData)) <- rownames(se.exprs(BSData)) <- rownames(nObservations(BSData)) <- probes
-            featureData(BSData) <- new("AnnotatedDataFrame", data = data.frame(ProbeID = probes, row.names = probes))
-        }
-        if (nrow(pData(BLData)) == len) {
-            if (imagesPerArray == 2) 
-                BSData at phenoData <- new("AnnotatedDataFrame", data = pData(BLData at phenoData)[arrayord, , drop = FALSE][seq(1, len, by = 2), , drop = FALSE])
-            else BSData at phenoData <- BLData at phenoData
-        }
-        else {
-            BSData at phenoData <- new("AnnotatedDataFrame", data = data.frame(sampleName = colnames(G)))
-        }
-        if (!is.null(pData(BSData)$sampleName)) 
-            sampleNames(BSData) <- pData(BSData)$sampleName
-        else sampleNames(BSData) <- colnames(G)
-        if (whatelse == "R") {
-            varMetadata <- data.frame(labelDescription = colnames(BSData at phenoData@data), channel = "_ALL_")
-            BSData at phenoData <- new("AnnotatedDataFrame", data = data.frame(BSData at phenoData@data), varMetadata = varMetadata)
-        }
-        BSData at annotation <- BLData at annotation
-        if ("qcScores" %in% names(BLData at arrayInfo)) 
-            t <- try(BSData at BeadLevelQC <- BLData at arrayInfo$qcScores, silent = TRUE)
-        BSData
-    })
-## computation of bead summaries via robloxbioc for "matrix"
-rmxBeadSummary <- function(x, probeIDs, probes, eps, eps.lower, eps.upper, steps, fsCor, mad0){
-    comIDs <- intersect(probeIDs, probes)
-    x <- x[probeIDs %in% comIDs]
-    probeIDs <- probeIDs[probeIDs %in% comIDs]
-    noBeads <- as.vector(table(probeIDs))
-    noBeads.uni <- as.integer(names(table(noBeads)))
-    probes1 <- comIDs
-    len1 <- length(probes1)
-    fore1 <- numeric(len1)
-    SD1 <- numeric(len1)
-    for(i in seq(along = noBeads.uni)){
-        index <- noBeads == noBeads.uni[i]
-        IDs <- probes1[index]
-        if(noBeads.uni[i] == 1){
-            fore1[index] <- x[probeIDs %in% IDs]
-            SD1[index] <- mad0
-        }else{
-            temp <- matrix(x[probeIDs %in% IDs], ncol = noBeads.uni[i], byrow = TRUE)
-            rmx <- robloxbioc(temp, eps = eps, eps.lower = eps.lower, eps.upper = eps.upper, 
-                              steps = steps, fsCor = fsCor, mad0 = mad0)
-            fore1[index] <- rmx[,"mean"]
-            SD1[index] <- rmx[,"sd"]
-        }
-    }    
-    len <- length(probes)
-    fore <- numeric(len)
-    SD <- numeric(len)
-    noBeads1 <- numeric(len)
-    nas <- !(probes %in% comIDs)
-    fore[nas] <- NA
-    fore[!nas] <- fore1
-    SD[nas] <- NA
-    SD[!nas] <- SD1
-    noBeads1[nas] <- 0
-    noBeads1[!nas] <- noBeads
-
-    return(list(fore = fore, sd = SD, noBeads = noBeads1))
-}

Modified: pkg/RobLoxBioC/man/robloxbioc.Rd
===================================================================
--- pkg/RobLoxBioC/man/robloxbioc.Rd	2012-03-03 22:18:35 UTC (rev 463)
+++ pkg/RobLoxBioC/man/robloxbioc.Rd	2012-03-03 22:30:52 UTC (rev 464)
@@ -3,7 +3,7 @@
 \alias{robloxbioc-methods}
 \alias{robloxbioc,matrix-method}
 \alias{robloxbioc,AffyBatch-method}
-\alias{robloxbioc,BeadLevelList-method}
+\alias{robloxbioc,BeadLevelData-method}
 
 \title{Generic Function for Preprocessing Biological Data}
 \description{
@@ -22,7 +22,7 @@
            mad0 = 1e-4, contrast.tau = 0.03, scale.tau = 10, 
            delta = 2^(-20), sc = 500)
 
-\S4method{robloxbioc}{BeadLevelList}(x, log = TRUE, imagesPerArray = 1, what = "G", probes = NULL, 
+\S4method{robloxbioc}{BeadLevelData}(x, log = TRUE, imagesPerArray = 1, what = "G", probes = NULL, 
            arrays = NULL, eps = NULL, eps.lower = 0, eps.upper = 0.05, 
            steps = 3L, fsCor = TRUE, mad0 = 1e-4)
 }
@@ -60,7 +60,7 @@
     Normally 1 for a SAM and 1 or 2 for a BeadChip. The images (strips) from the same array 
     will be combined so that each column in the output represents a sample. }
   \item{what}{ character string specifying which intensities/values to summarize. 
-    See \code{\link[beadarray]{getArrayData}} for a list of possibilities. }
+    See \code{\link[beadarray]{getBeadData}} for a list of possibilities. }
   \item{probes}{ Specify particular probes to summarize. If left \code{NULL} then all
     the probes on the first array are used. }
   \item{arrays}{ integer (scalar or vector) specifying the strips/arrays to summarize. 
@@ -100,6 +100,7 @@
 \value{ Return value depends on the class of \code{x}. 
   In case of \code{"matrix"} a matrix with columns "mean" and "sd" is returned.
   In case of \code{"AffyBatch"} an object of class \code{"ExpressionSet"} is returned. 
+  In case of \code{"BeadLevelData"} an object of class \code{"ExpressionSetIllumina"} is returned. 
 }
 \references{
   Affymetrix, Inc. (2002). \emph{Statistical Algorithms Description Document}.
@@ -168,13 +169,12 @@
 ## using Illumina-Data
 \dontrun{
 ## "Not run" just because of computation time
-if(require(beadarrayExampleData)){
-  data(exampleBLData)
-  res <- robloxbioc(exampleBLData, eps.upper = 0.5)
-  res
+require(beadarrayExampleData)
+data(exampleBLData)
+res <- robloxbioc(exampleBLData, eps.upper = 0.5)
+res
 }
 }
-}
 \concept{normal location and scale}
 \concept{infinitesimal robustness}
 \concept{radius-minimax estimator}



More information about the Robast-commits mailing list