[Robast-commits] r298 - in pkg/RobLoxBioC: R inst/scripts man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Apr 23 17:17:47 CEST 2009
Author: stamats
Date: 2009-04-23 17:17:47 +0200 (Thu, 23 Apr 2009)
New Revision: 298
Modified:
pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R
pkg/RobLoxBioC/inst/scripts/AffymetrixExample.R
pkg/RobLoxBioC/inst/scripts/IlluminaExample.R
pkg/RobLoxBioC/inst/scripts/IlluminaSimStudy.R
pkg/RobLoxBioC/man/robloxbioc.Rd
Log:
some updates of example code and default values ...
Modified: pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R
===================================================================
--- pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R 2009-04-23 10:21:24 UTC (rev 297)
+++ pkg/RobLoxBioC/R/robloxbiocBeadLevelList.R 2009-04-23 15:17:47 UTC (rev 298)
@@ -1,6 +1,6 @@
setMethod("robloxbioc", signature(x = "BeadLevelList"),
- function(x, log = FALSE, imagesPerArray = 1, what = "G", probes = NULL, arrays = NULL,
- eps = NULL, eps.lower = 0, eps.upper = 0.1, steps = 3L,
+ 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 <- arrayNames(BLData)
Modified: pkg/RobLoxBioC/inst/scripts/AffymetrixExample.R
===================================================================
--- pkg/RobLoxBioC/inst/scripts/AffymetrixExample.R 2009-04-23 10:21:24 UTC (rev 297)
+++ pkg/RobLoxBioC/inst/scripts/AffymetrixExample.R 2009-04-23 15:17:47 UTC (rev 298)
@@ -163,6 +163,9 @@
## Comparison of median distances
## Table in Kohl and Deigner (2009)
+round(sapply(res1, quantile, prob = 0.95) - sapply(res3, quantile, prob = 0.95), 4)
+round(sapply(res2, quantile, prob = 0.95) - sapply(res3, quantile, prob = 0.95)[-c(1,2,4,7)], 4)
+
round(sapply(res1, median) - sapply(res3, median), 4)
round(sapply(res2, median) - sapply(res3, median)[-c(1,2,4,7)], 4)
Modified: pkg/RobLoxBioC/inst/scripts/IlluminaExample.R
===================================================================
--- pkg/RobLoxBioC/inst/scripts/IlluminaExample.R 2009-04-23 10:21:24 UTC (rev 297)
+++ pkg/RobLoxBioC/inst/scripts/IlluminaExample.R 2009-04-23 15:17:47 UTC (rev 298)
@@ -58,13 +58,14 @@
M <- length(ns)
minKD.Illumina.norm <- matrix(NA, nrow = 50000, ncol = M)
colnames(minKD.Illumina.norm) <- ns
-for(i in seq_len(M)){
+#for(i in seq_len(M)){
+for(i in 27:61){
tm <- proc.time()
print(ns[i])
temp <- matrix(rnorm(50000*ns[i]), ncol = ns[i])
minKD.Illumina.norm[,i] <- KolmogorovMinDist(temp, Norm())$dist
cat("Dauer:\t", proc.time()-tm, "\n")
- save(minKD.Illumina.norm, compress = TRUE, file = "minKD_Illumina_norm.RData")
+ save(minKD.Illumina.norm, compress = TRUE, file = "minKD_Illumina_norm1.RData")
}
## load the results from R-forge
@@ -75,40 +76,57 @@
#######################################
## Figure in Kohl and Deigner (2009)
#######################################
-res1 <- split(as.vector(minKD.Illumina$dist), as.vector(minKD.Illumina$n))[10:70]
-res2 <- split(as.vector(minKD.Illumina.log$dist), as.vector(minKD.Illumina.log$n))[10:70]
-res3 <- lapply(as.data.frame(minKD.Illumina.norm), function(x) x)
-uni.n <- rep(10:70, 3)
+res1 <- split(as.vector(minKD.Illumina$dist), as.vector(minKD.Illumina$n))[20:60]
+res2 <- split(as.vector(minKD.Illumina.log$dist), as.vector(minKD.Illumina.log$n))[20:60]
+res3 <- lapply(as.data.frame(minKD.Illumina.norm[,11:51]), function(x) x)
+uni.n <- rep(20:60, 3)
postscript(file = "minKDIllumina.eps", height = 6, width = 9, paper = "special",
horizontal = TRUE)
par(mar = c(4, 4, 3, 1))
-plot(0, 0, type = "n", ylim = c(0, 0.49), xlim = c(0.5, 37.5),
- panel.first = abline(h = seq(0, 0.45, by = 0.05), lty = 2, col = "grey"),
+plot(0, 0, type = "n", ylim = c(-0.01, 0.4), xlim = c(0.5, 125.5),
+ panel.first = abline(h = seq(0, 0.35, by = 0.05), lty = 2, col = "grey"),
main = "Minimum Kolmogorov distance",
ylab = "minimum Kolmogorov distance",
xlab = "sample size", axes = FALSE)
-axis(1, c(1:61, 63:123, 125:185), labels = uni.n, cex.axis = 0.6)
-axis(2, seq(0, 0.4, by = 0.05), labels = seq(0, 0.4, by = 0.05), las = 2,
+axis(1, c(1:41, 43:83, 85:125), labels = uni.n, cex.axis = 0.6)
+axis(2, seq(0, 0.35, by = 0.05), labels = seq(0, 0.35, by = 0.05), las = 2,
cex.axis = 0.8)
box()
-boxplot(c(res1, res2, res3), at = c(1:61, 63:123, 125:185), add = TRUE, pch = 20,
+boxplot(c(res1, res2, res3), at = c(1:41, 43:83, 85:125), add = TRUE, pch = 20,
names = FALSE, axes = FALSE)
-abline(v = c(62, 124), lwd = 1.5)
-text(c(30, 93, 155), rep(0.48, 3), labels = c("Raw Data", "log Raw Data", "Normal Samples"),
+abline(v = c(42, 84), lwd = 1.5)
+text(c(20, 63, 105), rep(0.38, 3), labels = c("Bead Level Data", "log Bead Level Data", "Normal Samples"),
font = 2)
-lines(1:61, 1/(2*(10:70)), lwd = 2)
-lines(63:123, 1/(2*(10:70)), lwd = 2)
-lines(125:185, 1/(2*(10:70)), lwd = 2)
+lines(1:41, 1/(2*(20:60)), lwd = 2)
+lines(43:83, 1/(2*(20:60)), lwd = 2)
+lines(85:125, 1/(2*(20:60)), lwd = 2)
legend("bottomleft", legend = "minimal possible distance", lty = 1,
bg = "white", cex = 0.8)
dev.off()
## Comparison of median distances
-## Table in Kohl and Deigner (2009)
-round(sapply(res1, median) - sapply(res3, median), 4)
-round(sapply(res2, median) - sapply(res3, median), 4)
+## Figure in Kohl and Deigner (2009)
+res1 <- split(as.vector(minKD.Illumina$dist), as.vector(minKD.Illumina$n))[10:70]
+res2 <- split(as.vector(minKD.Illumina.log$dist), as.vector(minKD.Illumina.log$n))[10:70]
+res3 <- lapply(as.data.frame(minKD.Illumina.norm), function(x) x)
+postscript(file = "minKDIlluminaQuant.eps", height = 6, width = 9, paper = "special",
+ horizontal = TRUE)
+par(mar = c(4, 4, 3, 1))
+plot(10:70, sapply(res3, quantile, prob = 0.99), type = "l", lwd = 2, xlab = "sample size",
+ ylab = "quantile of mimimum Kolmogorov distances",
+ main = "50% and 99% quantiles of minimum Kolmogorov distances", ylim = c(0.05, 0.23))
+lines(10:70, sapply(res1, quantile, prob = 0.99), lwd = 2, lty = 2)
+lines(10:70, sapply(res2, quantile, prob = 0.99), lwd = 2, lty = 3)
+lines(10:70, sapply(res3, quantile, prob = 0.5), lwd = 2, lty = 1)
+lines(10:70, sapply(res1, quantile, prob = 0.5), lwd = 2, lty = 2)
+lines(10:70, sapply(res2, quantile, prob = 0.5), lwd = 2, lty = 3)
+text(22, 0.18, "99% quantiles", font = 2)
+text(22, 0.115, "50% quantiles", font = 2)
+legend("topright", legend = c("normal samples", "bead level data", "log bead level data"),
+ lty = 1:3, lwd = 2)
+dev.off()
###############################################################################
## The following example is based on the R code of Mark Dunning and Matt Ritchie
Modified: pkg/RobLoxBioC/inst/scripts/IlluminaSimStudy.R
===================================================================
--- pkg/RobLoxBioC/inst/scripts/IlluminaSimStudy.R 2009-04-23 10:21:24 UTC (rev 297)
+++ pkg/RobLoxBioC/inst/scripts/IlluminaSimStudy.R 2009-04-23 15:17:47 UTC (rev 298)
@@ -5,7 +5,7 @@
library(RobLoxBioC)
## fixed variables
-n <- 11
+n <- 30
M <- 1e5
eps.lower <- 0
eps.upper <- 0.05
Modified: pkg/RobLoxBioC/man/robloxbioc.Rd
===================================================================
--- pkg/RobLoxBioC/man/robloxbioc.Rd 2009-04-23 10:21:24 UTC (rev 297)
+++ pkg/RobLoxBioC/man/robloxbioc.Rd 2009-04-23 15:17:47 UTC (rev 298)
@@ -22,8 +22,8 @@
mad0 = 1e-4, contrast.tau = 0.03, scale.tau = 10,
delta = 2^(-20), sc = 500)
-\S4method{robloxbioc}{BeadLevelList}(x, log = FALSE, imagesPerArray = 1, what = "G", probes = NULL,
- arrays = NULL, eps = NULL, eps.lower = 0, eps.upper = 0.1,
+\S4method{robloxbioc}{BeadLevelList}(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)
}
\arguments{
More information about the Robast-commits
mailing list