[med-svn] [r-bioc-limma] 01/07: Imported Upstream version 3.18.4+dfsg

Andreas Tille tille at debian.org
Sat Dec 7 10:03:11 UTC 2013


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-bioc-limma.

commit 3913647be42082225889b5f06371e7b8ea9eff37
Author: Andreas Tille <tille at debian.org>
Date:   Sat Dec 7 10:13:38 2013 +0100

    Imported Upstream version 3.18.4+dfsg
---
 DESCRIPTION                               |   6 +-
 NAMESPACE                                 |   8 ++
 R/dups.R                                  |  36 +++--
 R/genas.R                                 |  91 ++++++-------
 R/{plotFG.R => plotFB.R}                  |  24 +++-
 R/plotdensities.R                         | 211 +++++++++++++-----------------
 R/plots-ma.R                              |  10 +-
 R/read-ilmn.R                             |   3 +-
 R/squeezeVar.R                            |  23 +++-
 R/toptable.R                              |   6 +-
 build/vignette.rds                        | Bin 219 -> 229 bytes
 inst/doc/changelog.txt                    |  46 +++++++
 inst/doc/index.html                       |   3 +-
 inst/doc/{limma.Rnw => intro.Rnw}         |   6 +-
 inst/doc/{limma.pdf => intro.pdf}         | Bin 45597 -> 46191 bytes
 man/09Diagnostics.Rd                      |   2 +-
 man/EList.Rd                              |   6 +-
 man/auROC.Rd                              |  12 +-
 man/avereps.Rd                            |  16 ++-
 man/backgroundcorrect.Rd                  |   6 +-
 man/beadCountWeights.Rd                   |  35 ++++-
 man/nec.Rd                                |   9 +-
 man/normalizebetweenarrays.Rd             |   2 +-
 man/plotDensities.Rd                      | 102 +++++----------
 man/plotFB.Rd                             |  14 +-
 man/read.ilmn.Rd                          |  30 +++--
 man/voom.Rd                               |   1 +
 man/vooma.Rd                              |   1 +
 inst/doc/limma.Rnw => vignettes/intro.Rnw |   6 +-
 29 files changed, 397 insertions(+), 318 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 4441e3f..44d6625 100755
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: limma
-Version: 3.18.1
-Date: 2013/10/23
+Version: 3.18.4
+Date: 2013/12/02
 Title: Linear Models for Microarray Data
 Author: Gordon Smyth [cre,aut], Matthew Ritchie [ctb], Jeremy Silver [ctb], James Wettenhall [ctb], Natalie Thorne [ctb], Mette Langaas [ctb], Egil Ferkingstad [ctb], Marcus Davy [ctb], Francois Pepin [ctb], Dongseok Choi [ctb], Davis McCarthy [ctb], Di Wu [ctb], Alicia Oshlack [ctb], Carolyn de Graaf [ctb], Yifang Hu [ctb], Wei Shi [ctb], Belinda Phipson [ctb]
 Maintainer: Gordon Smyth <smyth at wehi.edu.au>
@@ -14,4 +14,4 @@ URL: http://bioinf.wehi.edu.au/limma
 biocViews: Microarray, OneChannel, TwoChannel, DataImport,
         QualityControl, Preprocessing, Bioinformatics,
         DifferentialExpression, MultipleComparisons, TimeCourse
-Packaged: 2013-10-24 03:20:08 UTC; biocbuild
+Packaged: 2013-12-03 04:16:44 UTC; biocbuild
diff --git a/NAMESPACE b/NAMESPACE
index ea6a1d5..475997c 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -23,7 +23,9 @@ S3method(as.matrix,LumiBatch)
 S3method(as.matrix,vsn)
 S3method(avedups,MAList)
 S3method(avedups,EList)
+S3method(avereps,RGList)
 S3method(avereps,MAList)
+S3method(avereps,EListRaw)
 S3method(avereps,EList)
 S3method(avearrays,MAList)
 S3method(avearrays,EList)
@@ -73,6 +75,12 @@ S3method(plotMA,MAList)
 S3method(plotMA,EList)
 S3method(plotMA,MArrayLM)
 S3method(plotMDS,MDS)
+S3method(plotFB,RGList)
+S3method(plotFB,EListRaw)
+S3method(plotDensities,RGList)
+S3method(plotDensities,MAList)
+S3method(plotDensities,EListRaw)
+S3method(plotDensities,EList)
 S3method(roast,MAList)
 S3method(roast,EList)
 S3method(mroast,MAList)
diff --git a/R/dups.R b/R/dups.R
index ea70536..9657a29 100755
--- a/R/dups.R
+++ b/R/dups.R
@@ -192,14 +192,15 @@ avedups.EList <- function(x,ndups=x$printer$ndups,spacing=x$printer$spacing,weig
 	y
 }
 
-avereps <- function(x,ID) UseMethod("avereps")
-#  4 June 2008
+avereps <- function(x,...)
+#	4 June 2008
+	UseMethod("avereps")
 
-avereps.default <- function(x,ID=rownames(x))
+avereps.default <- function(x,ID=rownames(x),...)
 #	Average over irregular replicate spots, for matrices or vectors
 #	Gordon Smyth
 #	Created 3 June 2008.  Last modified 1 Dec 2010.
-#  Revised 19 Aug 2009 following suggestions from Axel Klenk.
+#	Revised 19 Aug 2009 following suggestions from Axel Klenk.
 #	Revised 28 March 2010 following suggestion from Michael Lawrence.
 {
 	if(is.null(x)) return(NULL)
@@ -219,7 +220,7 @@ avereps.default <- function(x,ID=rownames(x))
 	y/n
 }
 
-avereps.MAList <- function(x,ID=NULL)
+avereps.MAList <- function(x,ID=NULL,...)
 #	Average over irregular replicate spots for MAList objects
 #	Gordon Smyth
 #	3 June 2008.  Last modified 8 Sep 2010.
@@ -236,11 +237,11 @@ avereps.MAList <- function(x,ID=NULL)
 	for (a in other) y$other[[a]] <- avereps(x$other[[a]],ID=ID)
 	y$weights <- avereps(x$weights,ID=ID)
 	y$genes <- x$genes[!duplicated(ID),]
-   y$printer <- NULL
+	y$printer <- NULL
 	y
 }
 
-avereps.EList <- function(x,ID=NULL)
+avereps.EList <- function(x,ID=NULL,...)
 #	Average over irregular replicate probes for EList objects
 #	Gordon Smyth
 #	2 April 2010.  Last modified 20 May 2011.
@@ -256,6 +257,25 @@ avereps.EList <- function(x,ID=NULL)
 	for (a in other) y$other[[a]] <- avereps(x$other[[a]],ID=ID)
 	y$weights <- avereps(x$weights,ID=ID)
 	y$genes <- x$genes[!duplicated(ID),]
-   y$printer <- NULL
+	y$printer <- NULL
 	y
 }
+
+avereps.RGList <- function(x,ID=NULL,...)
+#	Warn users that averaging should not be applied prior to normalization
+#	Gordon Smyth
+#	2 December 2013.
+{
+	stop("avereps should not be applied to an RGList object")
+	invisible()
+}
+
+
+avereps.EListRaw <- function(x,ID=NULL,...)
+#	Warn users that averaging should not be applied prior to normalization
+#	Gordon Smyth
+#	2 December 2013.
+{
+	stop("avereps should not be applied to an EListRaw object")
+	invisible()
+}
diff --git a/R/genas.R b/R/genas.R
index 787baab..f296f46 100644
--- a/R/genas.R
+++ b/R/genas.R
@@ -57,13 +57,13 @@ genas <- function(fit,coef=c(1,2),subset="all",plot=FALSE,alpha=0.4)
 	Q2 <- optim(x, .multTLogLikNull, fit = fit, m = m)
 	Q1 <- optim(c(Q2$par[1], Q2$par[2], 0),.multTLogLik,fit=fit,m=m)
 		
-	L<-matrix(c(1,Q1$par[3],0,1),2,2)
-	D<-matrix(c(exp(Q1$par[1]),0,0,exp(Q1$par[2])),2,2)
-	V0<-L%*%D%*%t(L)
-	rhobiol<-V0[2,1]/sqrt(V0[1,1]*V0[2,2])
+	L <- matrix(c(1,Q1$par[3],0,1),2,2)
+	D <- matrix(c(exp(Q1$par[1]),0,0,exp(Q1$par[2])),2,2)
+	V0 <- L%*%D%*%t(L)
+	rhobiol <- V0[2,1]/sqrt(V0[1,1]*V0[2,2])
 
-	V<-fit$cov.coefficients
-	rhotech<-V[2,1]/sqrt(V[1,1]*V[2,2])
+	V <- fit$cov.coefficients
+	rhotech <- V[2,1]/sqrt(V[1,1]*V[2,2])
 
 	if(plot) {
 		require(ellipse)
@@ -92,8 +92,8 @@ genas <- function(fit,coef=c(1,2),subset="all",plot=FALSE,alpha=0.4)
 		}
 	}
 
-	D<-abs(2*(Q2$value-Q1$value))
-	p.val<-pchisq(D,df=1,lower.tail=FALSE)
+	D <- abs(2*(Q2$value-Q1$value))
+	p.val <- pchisq(D,df=1,lower.tail=FALSE)
 
 	list(technical.correlation=rhotech,covariance.matrix=V0,biological.correlation=rhobiol,deviance=D,p.value=p.val,n=nrow(fit))
 }
@@ -101,61 +101,54 @@ genas <- function(fit,coef=c(1,2),subset="all",plot=FALSE,alpha=0.4)
 .multTLogLikNull <- function(x,fit,m) 
 #	Calculate the log-likelihood under the null hypothesis of no biological correlation
 #	Belinda Phipson and Gordon Smyth
-#	21 September 2009. Last modified 21 September 2009.
+#	21 September 2009. Last modified 2 December 2013.
 {
-	d0<-fit$df.prior
-	d<-fit$df.residual
-	if(d0==Inf) d0 <- 999*d[1]
-	s<-fit$s2.post
-	B<-fit$coefficients
-	m<-m
-	V<-fit$cov.coefficients
-	a1<-x[1]
-	a2<-x[2]
-	chol<-matrix(c(exp(a1),0,0,exp(a2)),2,2)
-	V0<-t(chol) %*% chol
+	df.total <- fit$df.total
+	s <- fit$s2.post
+	B <- fit$coefficients
+	V <- fit$cov.coefficients
+	a1 <- x[1]
+	a2 <- x[2]
+	chol <- matrix(c(exp(a1),0,0,exp(a2)),2,2)
+	V0 <- t(chol) %*% chol
 	
-	R<-chol(V0+V)
-	Second<-sum(log(diag(R)))
+	R <- chol(V0+V)
+	Second <- sum(log(diag(R)))
 
-	W<-backsolve(R,t(B),transpose=TRUE)
+	W <- backsolve(R,t(B),transpose=TRUE)
 	Q <- colSums(W^2)
 
-	Third<-0.5*(m+d0+d)*log(1+Q/(s*(d0+d)))
+	Third <- 0.5*(m+df.total)*log(1+Q/s/df.total)
 	
 	sum(Second+Third)
 }
 
 
 .multTLogLik <- function(x,fit,m) 
-#  Calculate the log-likelihood with biological correlation
-#  Belinda Phipson and Gordon Smyth
-#  21 September 2009. Last modified 21 September 2009.
+#	Calculate the log-likelihood with biological correlation
+#	Belinda Phipson and Gordon Smyth
+#	21 September 2009. Last modified 2 December 2013.
 {	
-		d0<-fit$df.prior
-		d<-fit$df.residual
-		if(d0==Inf) d0 <- 999*d[1]
-		s<-fit$s2.post
-		B<-fit$coefficients
-		m<-m
-		V<-fit$cov.coefficients
-		a1<-x[1]
-		a2<-x[2]
-		b<-x[3]
-		L<-matrix(c(1,b,0,1),2,2)
-		D<-matrix(c(exp(a1),0,0,exp(a2)),2,2)
-	
-		V0<-L %*% D %*% t(L)
-	
-		R<-chol(V0+V)
-		Second<-sum(log(diag(R)))
-
-		W<-backsolve(R,t(B),transpose=TRUE)
-		Q<-colSums(W^2)
+	df.total <- fit$df.total
+	s <- fit$s2.post
+	B <- fit$coefficients
+	V <- fit$cov.coefficients
+	a1 <- x[1]
+	a2 <- x[2]
+	b <- x[3]
+	L <- matrix(c(1,b,0,1),2,2)
+	D <- matrix(c(exp(a1),0,0,exp(a2)),2,2)
+	V0 <- L %*% D %*% t(L)
+
+	R <- chol(V0+V)
+	Second <- sum(log(diag(R)))
+
+	W <- backsolve(R,t(B),transpose=TRUE)
+	Q <- colSums(W^2)
 
-		Third<-0.5*(m+d0+d)*log(1+Q/(s*(d0+d)))
+	Third <- 0.5*(m+df.total)*log(1+Q/s/df.total)
 
-		sum(Second+Third)
+	sum(Second+Third)
 }
 
 
diff --git a/R/plotFG.R b/R/plotFB.R
similarity index 51%
rename from R/plotFG.R
rename to R/plotFB.R
index c534dd0..00eac45 100644
--- a/R/plotFG.R
+++ b/R/plotFB.R
@@ -1,4 +1,6 @@
-plotFB <- function(RG, array=1, lim="separate", pch=16, cex=0.2, ...)
+plotFB <- function(x,...) UseMethod("plotFB")
+
+plotFB.RGList <- function(x, array=1, lim="separate", pch=16, cex=0.2, ...)
 #	Foreground-background plot
 #	Gordon Smyth
 #	5 March 2006.  Last modified 5 April 2006.
@@ -6,7 +8,7 @@ plotFB <- function(RG, array=1, lim="separate", pch=16, cex=0.2, ...)
 	lim <- match.arg(lim,c("separate","common"))
 	oldpar <- par(mfrow=c(1,2))
 	on.exit(par(oldpar))
-	x <- RG[,array]
+	x <- x[,array]
 	g1 <- log2(x$Gb)
 	g2 <- log2(x$G)
 	r1 <- log2(x$Rb)
@@ -23,3 +25,21 @@ plotFB <- function(RG, array=1, lim="separate", pch=16, cex=0.2, ...)
 	abline(0,1,col="blue")
 	invisible()
 }
+
+plotFB.EListRaw <- function(x, array=1, pch=16, cex=0.2, ...)
+#	Foreground-background plot
+#	Gordon Smyth
+#	13 November 2013.  Last modified 13 November 2013.
+{
+	x <- x[,array]
+	b <- log2(x$Eb)
+	f <- log2(x$E)
+	plot(b,f,pch=pch,cex=cex,xlab="log2 Background",ylab="log2 Foreground",main=paste("Array",array),...)
+	abline(0,1,col="blue")
+	invisible()
+}
+
+plotFB.default <- function(x, ...)
+{
+	stop("No plotFB method defined for class ", class(x))
+}
\ No newline at end of file
diff --git a/R/plotdensities.R b/R/plotdensities.R
index eb676fa..874ff7e 100755
--- a/R/plotdensities.R
+++ b/R/plotdensities.R
@@ -1,134 +1,99 @@
 #  PLOT DENSITIES
 
-plotDensities<-function(object,log=TRUE,arrays=NULL,singlechannels=NULL,groups=NULL,col=NULL)
+plotDensities <- function(object,...)
+UseMethod("plotDensities")
+
+plotDensities.RGList <- function(object,log=TRUE,group=NULL,col=NULL,main="RG Densities",...)
 #	Plot empirical single-channel densities
 #	Original version by Natalie Thorne, 9 September 2003
-#	Modified by Gordon Smyth.  Last modified 1 June 2005.  
+#	Modified by Gordon Smyth.  Last modified 18 Nov 2013.
 {
-	matDensities<-function(X){
-		densXY<-function(Z){
-			zd<-density(Z,na.rm=TRUE)
-			x<-zd$x
-			y<-zd$y
-			cbind(x,y)
-		}
-		out<-apply(X,2,densXY)
-		outx<-out[(1:(nrow(out)/2)),]
-		outy<-out[(((nrow(out)/2)+1):nrow(out)),]
-		list(X=outx,Y=outy)
-	}
-	
-	if(is(object,"MAList")) {
-		R <- object$A+object$M/2
-		G <- object$A-object$M/2
-		if(!log) {
-			R <- 2^R
-			G <- 2^G
-		}
+	object <- backgroundCorrect(object,method="subtract")
+	narray <- ncol(object)
+	E <- cbind(object$R,object$G)
+
+	if(log) E <- log2(E+1)
+
+	col2 <- col
+	if(is.null(group)) {
+		group2 <- factor(rep(1:2,c(narray,narray)),labels=c("R","G"))
+		if(is.null(col2)) col2 <- c("red","green")
 	} else {
-		R <- object$R
-		G <- object$G
-		if(!is.null(object$Rb)) R <- R-object$Rb
-		if(!is.null(object$Gb)) G <- G-object$Gb
-		if(log) {
-			R[R <= 0] <- NA
-			G[G <= 0] <- NA
-			R <- log(R,2)
-			G <- log(G,2)
-		}
+		group <- rep(group,narray)
+		group2 <- c(group,group)
 	}
 
-	if( is.null(arrays) & is.null(singlechannels) ){
-		arrays <- 1:(ncol(R))
-		x <- cbind(R,G)
-		if(is.null(groups)) {
-			groups <- c(length(arrays),length(arrays))
-			if(is.null(col))
-				cols <- rep(c("red","green"),groups)
-			if(!is.null(col)) {
-				if(length(col)!=2) {
-					warning("number of groups=2 not equal to number of col")
-					cols<-"black"
-				} else {
-					cols<-rep(col,groups)
-				}
-			}
-		} else {
-			if(!is.null(col)) {
-				if(length(as.vector(table(groups)))!=length(col)) {
-					warning("number of groups not equal to number of col")
-					cols <- col
-				} else {
-					cols <- col[groups]
-				}
-			} else {
-				warning("warning no cols in col specified for the groups")
-				cols <- "black"
-			}
-		} 
-	}else{	
-		if(!is.null(singlechannels)) {
-			if(!is.null(arrays)) warning("cannot index using arrays AND singlechannels")
-			x <- cbind(R,G)[,singlechannels]
-			if(is.null(groups)) {
-				groups <- c(length(intersect((1:ncol(R)),singlechannels)),
-			 length(intersect(((ncol(R)+1):ncol(cbind(G,R))),
-									singlechannels)))
-				if(is.null(col)) cols <- rep(c("red","green"),groups)
-				if(!is.null(col)) {
-					if(length(col)!=2) {
-						warning("number of groups=2 not equal to number of col")
-						cols<-"black"
-					} else {
-						cols<-rep(col,groups)
-					}
-				}
-			} else {
-				if(!is.null(col)) {
-					if(length(as.vector(table(groups)))!=length(col)) {
-						warning("number of groups not equal to number of col")
-						cols <- col
-					} else {
-						cols <- col[groups]
-					}
-				} else {
-					print("warning no cols in col specified for the groups")
-					cols <- "black"
-				}
-			}
-		}else{			
-			if(!is.null(arrays)) {
-				if(!is.null(singlechannels)) warning("cannot index using arrays AND singlechannels")
-				x <- cbind(R[,arrays],G[,arrays])
-				if(is.null(groups)) {
-					groups <- c(length(arrays),length(arrays))
-					if(is.null(col))
-						cols <- rep(c("red","green"),groups)
-					if(!is.null(col)) {
-						if(length(col)!=2) {
-							warning("number of groups=2 not equal to number of col")
-							cols<-"black"
-						} else {
-							cols <- rep(col,groups)
-						}
-					}
-				}else{
-					if(!is.null(col)) {
-						if(length(as.vector(table(groups)))!=length(col)){
-							warning("number of groups not equal to number of col")
-							cols <- "black"
-						}else{
-							cols <- col[groups]
-						}
-					}else{
-						warning("warning no cols in col specified for the groups")
-						cols <- "black"
-					}
-				}
-			}
-		}
+	plotDensities(E,group=group2,col=col2,main=main)
+}
+
+plotDensities.MAList <- function(object,log=TRUE,group=NULL,col=NULL,main="RG Densities",...)
+#	Plot empirical single-channel densities
+#	Original version by Natalie Thorne, 9 September 2003
+#	Modified by Gordon Smyth.  Last modified 18 Nov 2013.
+{
+	narray <- ncol(object)
+	E <- cbind(object$A+object$M/2, object$A-object$M/2)
+	if(!log) E <- 2^E
+
+	col2 <- col
+	if(is.null(group)) {
+		group2 <- factor(rep(1:2,c(narray,narray)),labels=c("R","G"))
+		if(is.null(col2)) col2 <- c("red","green")
+	} else {
+		group <- rep(group,narray)
+		group2 <- c(group,group)
 	}
 
-	dens.x<-matDensities(x)
-	matplot(dens.x$X,dens.x$Y,xlab="Intensity",ylab="Density",main="RG densities",type="l",col=cols,lwd=2,lty=1)
+	plotDensities(E,group=group2,col=col2,main=main)
+}
+
+plotDensities.EListRaw <- function(object,log=TRUE,group=NULL,col=NULL,main=NULL,...)
+{
+	object <- backgroundCorrect(object,method="subtract")
+	E <- object$E
+	if(log) E <- log2(E+1)
+	plotDensities(E,group=group,col=col,main=main)
+}
+
+plotDensities.EList <- function(object,log=TRUE,group=NULL,col=NULL,main=NULL,...)
+{
+	E <- object$E
+	if(!log) E <- 2^E
+	plotDensities(E,group=group,col=col,main=main)
+}
+
+plotDensities.default <- function(object,group=NULL,col=NULL,main=NULL,...)
+#	Plot empirical single-channel densities
+#	Gordon Smyth
+#	18 Nov 2013.  Last modified 18 Nov 2013.
+{
+#	Coerce object to matrix
+	E <- as.matrix(object)
+	narray <- ncol(E)
+
+#	Check group
+	if(is.null(group))  group <- colnames(E)
+	if(is.null(group))  group <- 1:narray
+	group <- as.factor(group)
+	ngroup <- nlevels(group)
+
+#	Check col
+	if(is.null(col)) col <- 1:ngroup
+	col <- rep(col,length=ngroup)
+
+#	Expand cols to number of arrays
+	arraycol <- group
+	levels(arraycol) <- col
+	arraycol <- as.vector(arraycol)
+
+	npoint <- 512
+	X <- Y <- matrix(0,npoint,narray)
+	for (a in 1:ncol(E)) {
+		d <- density(E[,a],n=npoint)
+		X[,a] <- d$x
+		Y[,a] <- d$y
+	}
+	matplot(X,Y,xlab="Intensity",ylab="Density",main=main,type="l",col=arraycol,lwd=2,lty=1)
+	if(ngroup>1) legend("topleft",lwd=2,legend=levels(group),col=col)
+	invisible(list(X=X,Y=Y))
 }
diff --git a/R/plots-ma.R b/R/plots-ma.R
index 76fcdea..0ce4aec 100755
--- a/R/plots-ma.R
+++ b/R/plots-ma.R
@@ -9,7 +9,7 @@ plotMA.RGList <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[arr
 #	Last modified 23 April 2013.
 {
 	MA <- MA.RG(MA[,array])
-	plotMA(MA,array=1,xlab=ylab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend,zero.weights=zero.weights,...)
+	plotMA(MA,array=1,xlab=xlab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend,zero.weights=zero.weights,...)
 }
 
 plotMA.MAList <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[array], xlim=NULL, ylim=NULL, status, values, pch, col, cex, legend=TRUE, zero.weights=FALSE, ...)
@@ -25,7 +25,7 @@ plotMA.MAList <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[arr
 		i <- is.na(w) | (w <= 0)
 		y[i] <- NA
 	}
-	.plotMAxy(x,y,xlab=ylab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
+	.plotMAxy(x,y,xlab=xlab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
 }
 
 plotMA.MArrayLM <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[array], xlim=NULL, ylim=NULL, status, values, pch, col, cex, legend=TRUE, zero.weights=FALSE, ...)
@@ -42,7 +42,7 @@ plotMA.MArrayLM <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[a
 		i <- is.na(w) | (w <= 0)
 		y[i] <- NA
 	}
-	.plotMAxy(x,y,xlab=ylab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
+	.plotMAxy(x,y,xlab=xlab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
 }
 
 plotMA.EList <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[array], xlim=NULL, ylim=NULL, status, values, pch, col, cex, legend=TRUE, zero.weights=FALSE, ...)
@@ -65,7 +65,7 @@ plotMA.EList <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[arra
 		i <- is.na(w) | (w <= 0)
 		y[i] <- NA
 	}
-	.plotMAxy(x,y,xlab=ylab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
+	.plotMAxy(x,y,xlab=xlab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
 }
 
 plotMA.default <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[array], xlim=NULL, ylim=NULL, status, values, pch, col, cex, legend=TRUE, zero.weights=FALSE, ...)
@@ -89,7 +89,7 @@ plotMA.default <- function(MA, array=1, xlab="A", ylab="M", main=colnames(MA)[ar
 		i <- is.na(w) | (w <= 0)
 		y[i] <- NA
 	}
-	.plotMAxy(x,y,xlab=ylab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
+	.plotMAxy(x,y,xlab=xlab,ylab=ylab,main=main,xlim=xlim,ylim=ylim,status=status,values=values,pch=pch,col=col,cex=cex,legend=legend, ...)
 }
 
 .plotMAxy <- function(x, y, xlab="A", ylab="M", main=NULL, xlim=NULL, ylim=NULL, status, values, pch, col, cex, legend=TRUE, ...)
diff --git a/R/read-ilmn.R b/R/read-ilmn.R
index 5cfdf59..63ed5ee 100644
--- a/R/read-ilmn.R
+++ b/R/read-ilmn.R
@@ -3,7 +3,7 @@
 read.ilmn <- function(files=NULL, ctrlfiles=NULL, path=NULL, ctrlpath=NULL, probeid="Probe", annotation=c("TargetID", "SYMBOL"), expr="AVG_Signal", other.columns="Detection",sep="\t", quote="\"", verbose=TRUE, ...)
 #	Read one or more files of Illumina BeadStudio output
 #	Wei Shi and Gordon Smyth.
-#  Created 15 July 2009. Last modified 27 October 2010.
+#  Created 15 July 2009. Last modified 27 November 2013.
 {
 	if(!is.null(files)){
 		f <- unique(files)
@@ -23,6 +23,7 @@ read.ilmn <- function(files=NULL, ctrlfiles=NULL, path=NULL, ctrlpath=NULL, prob
 		
 	if(!is.null(ctrlfiles)){
 		cf <- unique(ctrlfiles)
+		if(is.null(ctrlpath)) ctrlpath <- path
 		if(!is.null(ctrlpath)) cf <- file.path(ctrlpath, cf)
 		n <- length(cf)
 		for(i in 1:n){
diff --git a/R/squeezeVar.R b/R/squeezeVar.R
index 4bb7c5e..fc76f41 100644
--- a/R/squeezeVar.R
+++ b/R/squeezeVar.R
@@ -3,7 +3,7 @@
 squeezeVar <- function(var, df, covariate=NULL, robust=FALSE, winsor.tail.p=c(0.05,0.1))
 #	Empirical Bayes posterior variances
 #	Gordon Smyth
-#	2 March 2004.  Last modified 29 Nov 2012.
+#	2 March 2004.  Last modified 2 Dec 2013.
 {
 	n <- length(var)
 	if(n == 0) stop("var is empty")
@@ -13,24 +13,41 @@ squeezeVar <- function(var, df, covariate=NULL, robust=FALSE, winsor.tail.p=c(0.
 	} else {
 		if(length(df) != n) stop("lengths differ")
 	}
+
+#	Estimate prior var and df
 	if(robust)
 		fit <- fitFDistRobustly(var, df1=df, covariate=covariate, winsor.tail.p=winsor.tail.p)
 	else
 		fit <- fitFDist(var, df1=df, covariate=covariate)
-	var.prior <- fit$scale
+
+#	Prior var will be vector if robust=TRUE, otherwise scalar
+ 	var.prior <- fit$scale
+
+#	Prior df will be vector if covariate is non-NULL, otherwise scalar
 	df.prior <- fit$df2.shrunk
 	if(is.null(df.prior)) df.prior <- fit$df2
+
+#	Check estimated prior df
 	if(is.null(df.prior) || any(is.na(df.prior))) stop("Could not estimate prior df")
+
+#	Squeeze the posterior variances
 	df.total <- df + df.prior
 	var[df==0] <- 0 # guard against missing or infinite values
 	Infdf <- df.prior==Inf
 	if(any(Infdf)) {
 		var.post <- rep(var.prior,length.out=n)
 		i <- which(!Infdf)
-		if(length(i)) var.post[i] <- (df[i]*var[i] + df.prior[i]*var.prior[i]) / df.total[i]
+		if(length(i)) {
+			if(is.null(covariate))
+				s02 <- var.prior
+			else
+				s02 <- var.prior[i]
+			var.post[i] <- (df[i]*var[i] + df.prior[i]*s02) / df.total[i]
+		}
 	} else {
 		var.post <- (df*var + df.prior*var.prior) / df.total
 	}
+
 	list(df.prior=df.prior,var.prior=var.prior,var.post=var.post)
 }
 
diff --git a/R/toptable.R b/R/toptable.R
index 1bc60f4..0b57ce4 100644
--- a/R/toptable.R
+++ b/R/toptable.R
@@ -37,7 +37,7 @@ topTable <- function(fit,coef=NULL,number=10,genelist=fit$genes,adjust.method="B
 topTableF <- function(fit,number=10,genelist=fit$genes,adjust.method="BH",sort.by="F",p.value=1,lfc=0)
 #	Summary table of top genes by F-statistic
 #	Gordon Smyth
-#	27 August 2006. Last modified 22 April 2013.
+#	27 August 2006. Last modified 4 November 2013.
 {
 #	Check fit
 	if(is.null(fit$coefficients)) stop("Coefficients not found in fit")
@@ -90,14 +90,14 @@ topTableF <- function(fit,number=10,genelist=fit$genes,adjust.method="BH",sort.b
 			rn <- rn[keep]
 			Amean <- Amean[keep]
 			Fstat <- Fstat[keep]
-			Fp <- p.value[keep]
+			Fp <- Fp[keep]
 			genelist <- genelist[keep,,drop=FALSE]
 			adj.P.Value <- adj.P.Value[keep]
 		}
 	}
 
 #	Enough rows left?
-	if(nrow(fit) < number) number <- nrow(fit)
+	if(nrow(M) < number) number <- nrow(M)
 	if(number < 1) return(data.frame())
 
 #	Find rows of top genes
diff --git a/build/vignette.rds b/build/vignette.rds
index e3a034b..4a915c2 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/doc/changelog.txt b/inst/doc/changelog.txt
index f5f1e49..cfa5cd9 100755
--- a/inst/doc/changelog.txt
+++ b/inst/doc/changelog.txt
@@ -1,3 +1,49 @@
+ 2 Dec 2013: limma 3.18.4
+
+- bug fix to genas(), which was not handling vector df.prior
+  correctly when the fit object was generated using robust=TRUE.
+
+- genas() now uses fit$df.total from the MArrayLM object.  This 
+  prevents df.total from exceeding the total pooled residual df
+  for the dataset.  The genas() results will change slightly for
+  datasets for which df.prior was very lage.
+
+- bug fix to squeezeVar().  Previously there was an error when
+  robust=TRUE and trend=FALSE and some of the estimated df.prior
+  were infinite.
+
+- The ctrlpath argument of read.ilmn() now defaults to the same as
+  path for regular probes.  This means that only one path setting
+  is required if the regular and control probe profiles are in the
+  same directory.
+
+- avereps() was never intended to be applied to RGList or EListRaw
+  objects.  It now gives an error when applied to these objects
+  instead of returning a matrix of questionable value.
+
+- plotDensities() is now an S3 generic function with methods for
+  RGList, MAList, EListRaw and EList objects.
+
+13 Nov 2013: limma 3.18.3
+
+- plotFB now an S3 generic function with methods for RGList and EList
+  data objects.
+
+- edits to help pages for read.ilmn, neqc, beadCountWeights, voom and
+  vooma.  Update cross link to affy::normalize-method in
+  normalizeBetweenArrays.Rd.  Remove cross reference to ROC package
+  in auROC.Rd.
+
+- Vignette limma.Rnw renamed to intro.Rnw and moved to vignette
+  directory.
+
+- bug fix to x-axis label for some plotMA methods.
+
+ 4 Nov 2013: limma 3.18.2
+
+- bug fix to topTable() and topTableF() when sorting by F-statistic
+  combined with p-value or lfc cutoffs.
+
 23 Oct 2013: limma 3.18.1
 
 - NEWS.Rd updated to reflect changes in Bioconductor 2.13 Release.
diff --git a/inst/doc/index.html b/inst/doc/index.html
index ddfcf66..299dd0d 100755
--- a/inst/doc/index.html
+++ b/inst/doc/index.html
@@ -14,7 +14,8 @@
 
 <ul>
 <li><a href="usersguide.pdf">LIMMA User's Guide (pdf)</a>. This is the main documentation for the package.</li>
-<li><a href="limma.pdf">LIMMA Vignette (pdf)</a>. A brief Sweave vignette referring to the User's Guide.</li>
+<li><a href="intro.pdf">LIMMA Introduction (pdf)</a>. One page introduction.</li>
+<li><a href="changelog.txt">LIMMA Change Log (txt)</a>. Historical record of changes.</li>
 </ul>
 
 <hr>
diff --git a/inst/doc/limma.Rnw b/inst/doc/intro.Rnw
old mode 100755
new mode 100644
similarity index 89%
copy from inst/doc/limma.Rnw
copy to inst/doc/intro.Rnw
index 6214eef..88f952a
--- a/inst/doc/limma.Rnw
+++ b/inst/doc/intro.Rnw
@@ -1,4 +1,4 @@
-%\VignetteIndexEntry{Limma Vignette}
+%\VignetteIndexEntry{Limma One Page Introduction}
 %\VignetteDepends{}
 %\VignetteKeywords{microarray linear model}
 %\VignettePackage{limma}
@@ -12,9 +12,9 @@
 \headsep=0in
 
 \begin{document}
-\title{Limma Package Vignette}
+\title{Limma Package Introduction}
 \author{Gordon Smyth}
-\date{23 October 2004}
+\date{23 October 2004, Revised 21 October 2013}
 \maketitle
 
 Limma is an R package for the analysis of gene expression microarray data, especially the use of linear models for analysing designed experiments and the assessment of differential expression.
diff --git a/inst/doc/limma.pdf b/inst/doc/intro.pdf
similarity index 73%
rename from inst/doc/limma.pdf
rename to inst/doc/intro.pdf
index 1c12e39..b0e97a8 100644
Binary files a/inst/doc/limma.pdf and b/inst/doc/intro.pdf differ
diff --git a/man/09Diagnostics.Rd b/man/09Diagnostics.Rd
index ec74af8..a34abea 100644
--- a/man/09Diagnostics.Rd
+++ b/man/09Diagnostics.Rd
@@ -20,7 +20,7 @@ Produces a spatial picture of any spot-specific measure from an array image. If
 \code{\link{imageplot3by2}} will write imageplots to files, six plots to a page.}
 
 \item{ \code{\link{plotFB}} }{
-Plots foreground versus background log-intensies for a two-color array.}
+Plots foreground versus background log-intensies.}
 
 \item{ \code{\link{plotMA}} }{
 MA-plots.
diff --git a/man/EList.Rd b/man/EList.Rd
index 4456190..63f31b8 100644
--- a/man/EList.Rd
+++ b/man/EList.Rd
@@ -16,7 +16,9 @@ A list-based S4 classes for storing expression values (E-values) for a set of on
 \code{EList} objects can be created by \code{new("EList",E)} where \code{E} is a list.
 These classes contains no slots (other than \code{.Data}), but objects should contain a list component \code{E} as follows:
 \tabular{ll}{
-  \code{E} \tab numeric matrix containing the E-values (raw or log-2 expression ratios).  Rows correspond to probes and columns to arrays.
+  \code{E} \tab numeric matrix containing expression values.  Rows correspond to probes and columns to arrays.
+  In an \code{EListRaw} object, these are unlogged values. 
+  In an \code{EList} object, these are log2 values.
 }
 Optional components include:
 \tabular{ll}{
@@ -32,7 +34,7 @@ Valid \code{EList} or \code{EListRaw} objects may contain other optional compone
 These classes inherit directly from class \code{list} so any operation appropriate for lists will work on objects of this class.
 In addition, \code{EList} objects can be \link[limma:subsetting]{subsetted} and \link[limma:cbind]{combined}.
 \code{EList} objects will return dimensions and hence functions such as \code{\link[limma:dim]{dim}}, \code{\link[base:nrow]{nrow}} and \code{\link[base:nrow]{ncol}} are defined. 
-\code{ELists} also inherit a \code{\link[methods]{show}} method from the virtual class \code{\link[limma:LargeDataObject]{LargeDataObject}}, which means that \code{ELists} will print in a compact way.
+\code{EList}s also inherit a \code{\link[methods]{show}} method from the virtual class \code{\link[limma:LargeDataObject]{LargeDataObject}}, which means that \code{ELists} will print in a compact way.
 }
 
 \author{Gordon Smyth}
diff --git a/man/auROC.Rd b/man/auROC.Rd
index e93ffa9..e2e8a5a 100755
--- a/man/auROC.Rd
+++ b/man/auROC.Rd
@@ -13,17 +13,19 @@ auROC(truth, stat=NULL)
   If \code{NULL}, then \code{truth} is assumed to be already sorted in decreasing test statistic order.}
 }
 \details{
-This function computes the exact area under an empirical ROC curve.
-Cases are ranked by \code{stat} from largest to smallest.
-The number of true and false discoveries are determined by how well the true states represented by \code{truth} match up with the observed statistics given by \code{stat}.
+A receiver operating curve (ROC) is a plot of sensitivity (true positive rate) versus error (false positive rate) for a statistical test or binary classifier.
+The area under the ROC is a well accepted measure of test performance.
+It is equivalent to the probability that a randomly chosen pair of cases is corrected ranked.
+
+Here we consider a test statistic \code{stat}, with larger values being more significant, and a vector \code{truth} indicating whether the null hypothesis is in fact true.
+Correct ranking here means that \code{truth[i]} is greater than or equal to \code{truth[j]} when \code{stat[i]} is greater than \code{stat[j]}. 
+The function computes the exact area under the empirical ROC curve defined by \code{truth} when ordered by \code{stat}.
 }
 \value{
 Numeric vector giving area under the curve, 1 being perfect and 0 being the minimum, or \code{NULL} if \code{truth} has zero length.
 }
 \seealso{
 See \link{08.Tests} for other functions for testing and processing p-values.
-
-See also \code{\link[ROC]{AUC}} in the \code{ROC} package.
 }
 \examples{
 auROC(c(1,1,0,0,0))
diff --git a/man/avereps.Rd b/man/avereps.Rd
index dc729bd..4b0c1e7 100644
--- a/man/avereps.Rd
+++ b/man/avereps.Rd
@@ -3,18 +3,21 @@
 \alias{avereps.default}
 \alias{avereps.MAList}
 \alias{avereps.EList}
+\alias{avereps.EListRaw}
+\alias{avereps.RGList}
 \title{Average Over Irregular Replicate Probes}
 \description{
 Condense a microarray data object so that values for within-array replicate probes are replaced with their average.
 }
 \usage{
-\method{avereps}{default}(x, ID=rownames(x))
-\method{avereps}{MAList}(x, ID=NULL)
-\method{avereps}{EList}(x, ID=NULL)
+\method{avereps}{default}(x, ID=rownames(x), \dots)
+\method{avereps}{MAList}(x, ID=NULL, \dots)
+\method{avereps}{EList}(x, ID=NULL, \dots)
 }
 \arguments{
   \item{x}{a matrix-like object, usually a matrix, \code{MAList} or \code{EList} object.}
   \item{ID}{probe identifier.}
+  \item{\dots}{other arguments are not currently used.}
 }
 \details{
 A new data object is computed in which each probe ID is represented by the average of its replicate spots or features.
@@ -26,9 +29,16 @@ For an \code{MAList} object, \code{ID} defaults to \code{MA$genes$ID} is that ex
 
 If \code{x} is of mode \code{"character"}, then the replicate values are assumed to be equal and the first is taken as the average.
 }
+
+\note{
+This function should only be applied to normalized log-expression values, and not to raw unlogged expression values.
+It will generate an error message if applied to \code{RGList} or \code{EListRaw} objects.
+}
+
 \value{
 A data object of the same class as \code{x} with a row for each unique value of \code{ID}.
 }
+
 \author{Gordon Smyth}
 \seealso{
   \code{\link{avedups}}, \code{\link{avearrays}}. Also \code{\link[base]{rowsum}} in the base package.
diff --git a/man/backgroundcorrect.Rd b/man/backgroundcorrect.Rd
index a931e74..f87d67f 100755
--- a/man/backgroundcorrect.Rd
+++ b/man/backgroundcorrect.Rd
@@ -6,8 +6,10 @@
 Background correct microarray expression intensities.
 }
 \usage{
-backgroundCorrect(RG, method="auto", offset=0, printer=RG$printer, normexp.method="saddle", verbose=TRUE)
-backgroundCorrect.matrix(E, Eb=NULL, method="auto", offset=0, printer=NULL, normexp.method="saddle", verbose=TRUE)
+backgroundCorrect(RG, method="auto", offset=0, printer=RG$printer,
+                  normexp.method="saddle", verbose=TRUE)
+backgroundCorrect.matrix(E, Eb=NULL, method="auto", offset=0, printer=NULL,
+                  normexp.method="saddle", verbose=TRUE)
 }
 \arguments{
   \item{RG}{a numeric matrix, \code{\link[limma:EList]{EListRaw}} or \code{\link[limma:rglist]{RGList}} object.}
diff --git a/man/beadCountWeights.Rd b/man/beadCountWeights.Rd
index 226a215..ff26b5f 100644
--- a/man/beadCountWeights.Rd
+++ b/man/beadCountWeights.Rd
@@ -12,8 +12,8 @@ beadCountWeights(y, x, design = NULL, bead.stdev = NULL, nbeads = NULL, array.cv
 }
 
 \arguments{
- \item{y}{any matrix-like object containing log-expression values that can be coerced to a matrix.}
- \item{x}{any matrix-like object containing raw expression values that can be coerced to a matrix.}
+ \item{y}{normalized log2-expression values.}
+ \item{x}{raw expression values.}
  \item{design}{the design matrix of the microarray experiment, with rows
            corresponding to arrays and columns to coefficients to be
            estimated.  Defaults to the unit vector meaning that the
@@ -25,15 +25,22 @@ beadCountWeights(y, x, design = NULL, bead.stdev = NULL, nbeads = NULL, array.cv
 }
 
 \details{
-The relative reliability of each gene on each array is measured by estimating its technical and biological variability.
+This function estimates optimum weights using the bead statistics for each probe for an Illumina expression BeadChip.
+It can be used with any Illumina expression BeadChip, but is most likely to be useful with HumanHT-12 BeadChips.
 
-The technical variance for each gene on each array is inversely proportional to the number of beads and is estimated using array-specific bead-level coefficients of variation.
+Arguments \code{x} and \code{y} are both required.
+\code{x} contains the raw expression values and \code{y} contains the corresponding log2 values for the same probes and the same arrays after background correction and normalization.
+\code{x} and \code{y} be any type of object that can be coerced to a matrix, with rows corresponding to probes and columns to arrays.
+\code{x} and \code{y} must contain the same rows and columns in the same order.
 
-Coefficients of variation are calculated using raw expression values. 
+The reliability of the normalized expression value for each probe on each array is measured by estimating its technical and biological variability.
+The bead number weights are the inverse sum of the technical and biological variances.
+
+The technical variance for each probe on each array is inversely proportional to the number of beads and is estimated using array-specific bead-level coefficients of variation.
 
-The biological variance for each gene across the arrays are estimated using Newton's iterations, with the assumption that the total residual deviance for each gene from \code{lmFit} is inversely proportional to the sum of the technical variance and biological variance. 
+Coefficients of variation are calculated using raw expression values. 
 
-The bead number weights are an inverse of the sum of estimates for technical variances and biological variances.
+The biological variance for each probe across the arrays are estimated using a Newton iteration, with the assumption that the total residual deviance for each probe from \code{lmFit} is inversely proportional to the sum of the technical variance and biological variance. 
 
 If any of the arguments \code{design}, \code{bead.stdev} or \code{nbeads} are set explicitly in the call they will over-ride the slots or components in the data \code{object}. The argument \code{design} does not normally need to be set in the call but will be extracted from the data \code{object} if available. If arguments \code{bead.stdev} and \code{nbeads} are not set explicitly in the call, it is necessary that they are available for extraction from the data \code{object}.
 }
@@ -52,10 +59,24 @@ A list object with the following components:
 Law, CW (2013).
 \emph{Precision weights for gene expression analysis}.
 PhD Thesis. University of Melbourne, Australia.
+\url{http://repository.unimelb.edu.au/10187/17598}
 }
 
 \author{Charity Law and Gordon Smyth}
 
+\examples{
+\dontrun{
+ps <- read.ilmn(files="probesummaryprofile.txt",
+     ctrfiles="controlprobesummary.txt",
+     other.columns=c("BEAD_STDEV","Avg_NBEADS"))
+y <- neqc(ps)
+x <- ps[ps$genes$Status=="regular",]
+bcw <- beadCountWeights(y,x,design)
+fit <- lmFit(y,design,weights=bcw$weights)
+fit <- eBayes(fit)
+}
+}
+
 \seealso{
 An overview of linear model functions in limma is given by \link{06.LinearModels}.
 }
diff --git a/man/nec.Rd b/man/nec.Rd
index e6aabbc..57cf5a1 100644
--- a/man/nec.Rd
+++ b/man/nec.Rd
@@ -4,8 +4,10 @@
 \title{NormExp Background Correction and Normalization Using Control Probes}
 \description{Perform normexp background correction using negative control probes and quantile normalization using negative and positive control probes.}
 \usage{
-nec(x, status=NULL, negctrl="negative", regular="regular", offset=16, robust=FALSE,detection.p="Detection")
-neqc(x, status=NULL, negctrl="negative", regular="regular", offset=16, robust=FALSE, detection.p="Detection",...)
+nec(x, status=NULL, negctrl="negative", regular="regular", offset=16,
+    robust=FALSE, detection.p="Detection")
+neqc(x, status=NULL, negctrl="negative", regular="regular", offset=16,
+    robust=FALSE, detection.p="Detection", ...)
 }
 \arguments{
   \item{x}{object of class \code{EListRaw} or \code{matrix} containing raw intensities for regular and control probes from a series of microarrays.}
@@ -65,8 +67,9 @@ Optimizing the noise versus bias trade-off for Illumina Whole Genome Expression
 \examples{
 \dontrun{
 # neqc normalization for data which include control probes
-x <- read.ilmn(files="sample probe profile.txt",ctrlfiles="control probe profile.txt")
+x <- read.ilmn(files="sample probe profile.txt", ctrlfiles="control probe profile.txt")
 y <- neqc(x)
+fit <- lmFit(y,design)
 
 # Same thing but in separate steps:
 x.b <- nec(x)
diff --git a/man/normalizebetweenarrays.Rd b/man/normalizebetweenarrays.Rd
index 194339b..08c4557 100755
--- a/man/normalizebetweenarrays.Rd
+++ b/man/normalizebetweenarrays.Rd
@@ -90,7 +90,7 @@ In: D. R. Goldstein (ed.), \emph{Science and Statistics: A Festschrift for Terry
   Note that vsn normalization, previously offered as a method of this function, is now performed by the \code{\link{normalizeVSN}} function.
 
   See also \code{\link[marray:maNormScale]{maNormScale}} in the marray package and
-  \code{\link[affy:normalize]{normalize}} in the affy package.
+  \code{\link[affy:normalize-methods]{normalize-methods}} in the affy package.
 }
 
 \examples{
diff --git a/man/plotDensities.Rd b/man/plotDensities.Rd
index 38c952e..f470a32 100755
--- a/man/plotDensities.Rd
+++ b/man/plotDensities.Rd
@@ -1,99 +1,59 @@
-\title{Individual-channel Densities Plot}
+\title{Plot Expression Densities}
 \name{plotDensities}
 \alias{plotDensities}
+\alias{plotDensities.default}
+\alias{plotDensities.RGList}
+\alias{plotDensities.MAList}
+\alias{plotDensities.EListRaw}
+\alias{plotDensities.EList}
 \description{
-Plots the densities of individual-channel intensities for two-color microarray data.
+Plot the density of expression values for multiple arrays on the same plot.
 }
 \usage{
-plotDensities(object, log=TRUE, arrays=NULL, singlechannels=NULL, groups=NULL, col=NULL) 
+\method{plotDensities}{RGList}(object, log=TRUE, group=NULL, col=NULL, main="RG Densities",...)
+\method{plotDensities}{MAList}(object, log=TRUE, group=NULL, col=NULL, main="RG Densities",...)
+\method{plotDensities}{EListRaw}(object, log=TRUE, group=NULL, col=NULL, main=NULL,...)
+\method{plotDensities}{EList}(object, log=TRUE, group=NULL, col=NULL, main=NULL,...)
+\method{plotDensities}{default}(object, group=NULL, col=NULL, main=NULL,...)
 }
 \arguments{
-  \item{object}{an \code{RGList} or \code{MAList} object. \code{RGList} objects containing logged or unlogged intensities can be accommodated using the \code{log.transform} argument.}
+  \item{object}{an \code{RGList}, \code{MAList}, \code{EListRaw} or \code{EList} object containing expression data.  Or any data object that can be coerced to a matrix.}
 
-  \item{log}{logical, should densities be formed and plotted for the log-intensities (\code{TRUE}) or raw intensities (\code{FALSE})?}
-  
-  \item{arrays}{vector of integers giving the arrays from which the
-    individual-channels will be selected to be plotted.
-    Corresponds to columns of \code{M}
-    and \code{A} (or \code{R} and \code{G}).  Defaults to all arrays.}
-  
-  \item{singlechannels}{vector of integers indicating which
-    individual-channels will be selected to be plotted.  Values correspond
-    to the columns of the matrix of \code{cbind(R,G)} and range
-    between \code{1:ncol(R)} for red channels and
-    \code{( (ncol(R)+1):(ncol(R)+ncol(G)) )} for the green
-    channels in \code{object}.
-    Defaults to all channels.}
-  
-  \item{groups}{vector of consecutive integers beginning at 1 indicating
-    the groups of arrays or individual-channels (depending on which of
-    \code{arrays} or \code{singlechannels} are non \code{NULL}).  This is used
-    to color any groups of the individual-channel densities.
-    If \code{NULL} (default), \code{groups} correspond to the
-    red and green channels.  If both \code{arrays} and
-    \code{singlechannels} are \code{NULL} all arrays are selected and
-    groups (if specified) must correspond to the arrays.}
+  \item{log}{logical, should densities be plotted on the log2 scale?}
+
+  \item{group}{optional vector or factor classifying the arrays into groups.  Should be same length as \code{ncol(object)}.}
 
-  \item{col}{vector of colors of the same length as the number of
-    different groups. If \code{NULL} (default) the \code{col} equals
-    \code{c("red","green")}.  See details for more specifications.}
+  \item{col}{optional vector of colors of the same length as the number of groups.}
+
+  \item{main}{the main title for the plot.}
+  
+  \item{\ldots}{Not currently used.}
 }
 
 \details{
-This function is used as a data display technique associated with between-array normalization, especially individual-channel normalization methods such as quantile-normalization.
+This function is useful to display and contrast the distribution of expression values on different arrays.
+It can for example be used to display the effects of between-array normalization.
 See the section on between-array normalization in the LIMMA User's Guide.
-
-If no \code{col} is specified, the default is to color individual channels
-according to red and green. If both \code{arrays} and \code{groups} are
-non-\code{NULL}, then the length of \code{groups} must equal the length
-of \code{arrays} and the maximum of \code{groups} (i.e. the number of
-groups) must equal the length of \code{col} otherwise the default color
-of black will be used for all individual-channels.
-If \code{arrays} is \code{NULL} and both \code{singlechannels} and
-\code{groups} are non-\code{NULL}, then the length of \code{groups} must
-equal the length of \code{singlechannels} and the maximum of \code{groups}
-(i.e. the number of groups) must equal the length of \code{col}
-otherwise the default color of black will be used for all individual-channels.
 }
 \value{A plot is created on the current graphics device.}
-\author{Natalie Thorne}
+\author{Natalie Thorne and Gordon Smyth}
 \seealso{
 An overview of diagnostic plots in LIMMA is given in \link{09.Diagnostics}.
 There is a section using \code{plotDensities} in conjunction with between-array normalization
 in the \link[=limmaUsersGuide]{LIMMA User's Guide}.
+
+This function uses \code{\link{density}} and \code{\link{matplot}}.
 }
 \examples{
 \dontrun{
-#  Default settings for plotDensities.
+#  Default is to plot red channels in red and green channels in green
 plotDensities(MA)
 
-#  One can reproduce the default settings.
-plotDensities(MA,arrays=c(1:6),groups=c(rep(1,6),rep(2,6)),
-col=c("red","green"))
-
-#  Color R and G individual-channels by blue and purple.
-plotDensities(MA,arrays=NULL,groups=NULL,col=c("blue","purple"))
-
-#  Indexing individual-channels using singlechannels (arrays=NULL).
-plotDensities(MA,singlechannels=c(1,2,7))
-
-#  Change the default colors from c("red","green") to c("pink","purple")
-plotDensities(MA,singlechannels=c(1,2,7),col=c("pink","purple"))
-
-#  Specified too many colors since groups=NULL defaults to two groups.
-plotDensities(MA,singlechannels=c(1,2,7),col=c("pink","purple","blue"))
-
-#  Three individual-channels, three groups, three colors.
-plotDensities(MA,singlechannels=c(1,2,7),groups=c(1,2,3),
-col=c("pink","purple","blue"))
-
-#  Three individual-channels, one group, one color.
-plotDensities(MA,singlechannels=c(1,2,7),groups=c(1,1,1),
-col=c("purple"))
+#  Alternatively colors
+plotDensities(MA, col=c("red","blue"))
 
-#  All individual-channels, three groups (ctl,tmt,reference), three colors.
-plotDensities(MA,singlechannels=c(1:12),
-groups=c(rep(1,3),rep(2,3),rep(3,6)),col=c("darkred","red","green"))
+#  Color by group, with three groups:
+plotDensities(MA,group=group,col=c("blue","orange","green"))
 }
 }
 \keyword{hplot}
diff --git a/man/plotFB.Rd b/man/plotFB.Rd
index d30c881..301e1c6 100644
--- a/man/plotFB.Rd
+++ b/man/plotFB.Rd
@@ -1,15 +1,19 @@
 \title{FB-Plot}
 \name{plotFB}
 \alias{plotFB}
+\alias{plotFB.RGList}
+\alias{plotFB.EListRaw}
+\alias{plotFB.default}
 \description{
 Creates foreground-background plots.
 }
 \usage{
-plotFB(RG, array=1, lim="separate", pch=16, cex=0.2, ...)
+\method{plotFB}{RGList}(x, array=1, lim="separate", pch=16, cex=0.2, ...)
+\method{plotFB}{EListRaw}(x, array=1, pch=16, cex=0.2, ...)
 }
 \arguments{
-  \item{RG}{an \code{RGList} object.}
-  \item{array}{integer giving the array to be plotted. Corresponds to columns of \code{R}, \code{G}, \code{Rb} and \code{Gb}.}
+  \item{x}{an \code{RGList} or \code{EListRaw} object.}
+  \item{array}{integer giving the array to be plotted.}
   \item{lim}{character string indicating whether the red and green plots should have \code{"separate"} or \code{"common"} x- and y- co-ordinate limits.}
   \item{pch}{vector or list of plotting characters. Defaults to integer code 16.}
   \item{cex}{numeric vector of plot symbol expansions.} 
@@ -17,8 +21,8 @@ plotFB(RG, array=1, lim="separate", pch=16, cex=0.2, ...)
 }
 
 \details{
-A foreground-background plot is a plot of log2-foreground vs log2-background for a particular channel on a particular two-color array.
-This function produces a pair of plots, one for green and one for red, for a specified array.
+A foreground-background plot is a plot of log2-foreground vs log2-background for a particular array.
+For two-color arrays, this function produces a pair of plots, one for the green channel and one for the red.
 
 See \code{\link[graphics]{points}} for possible values for \code{pch}, \code{col} and \code{cex}.
 }
diff --git a/man/read.ilmn.Rd b/man/read.ilmn.Rd
index 130eb06..4254a58 100644
--- a/man/read.ilmn.Rd
+++ b/man/read.ilmn.Rd
@@ -5,21 +5,21 @@
 \usage{
 read.ilmn(files=NULL, ctrlfiles=NULL, path=NULL, ctrlpath=NULL,
 probeid="Probe",  annotation=c("TargetID", "SYMBOL"), expr="AVG_Signal", other.columns="Detection", 
-sep="\t", quote="\"", verbose=TRUE, ...)
+sep="\t", quote="\"", verbose=TRUE, \dots)
 }
 \arguments{
-  \item{files}{ character vector giving the names of the summary probe profile files.}
-  \item{ctrlfiles}{ character vector giving the names of the summary control probe profile files.}
-  \item{path}{ character string giving the directory containing the summary probe profile files. The default is the current working directory.}
-  \item{ctrlpath}{ character string giving the directory containing the summary control probe profile files. The default is the current working directory.}
-  \item{probeid}{ character string giving the name of the probe identifier column.}
-  \item{annotation}{ character vector giving possible names of the annotation column. It could be called "TargetID" or "SYMBOL" depending on which version of BeadStudio is used.}
-  \item{expr}{ character string giving the keyword in the names of the expression intensity columns.}
-  \item{other.columns}{ character vector giving the keywords in the names of extra columns required, such as "Detection", "Avg_NBEADS", "BEAD_STDEV" etc. Each keyword corresponds to one type of columns. The detection p value columns will be read in by default.}
-  \item{sep}{ the field separator character.}
-  \item{quote}{ character string of characters to be treated as quote marks.}
-  \item{verbose}{ logical, \code{TRUE} to report names of profile files being read.}
-  \item{...}{ any other parameters are passed on to \code{\link{read.columns}}.}
+  \item{files}{character vector giving the names of the summary probe profile files.}
+  \item{ctrlfiles}{character vector giving the names of the summary control probe profile files.}
+  \item{path}{character string giving the directory containing the summary probe profile files. The default is the current working directory.}
+  \item{ctrlpath}{character string giving the directory containing the summary control probe profile files. Defaults to the same directory as for the probe profile files.}
+  \item{probeid}{character string giving the name of the probe identifier column.}
+  \item{annotation}{character vector giving possible names of the annotation column. It could be called "TargetID" or "SYMBOL" depending on which version of BeadStudio is used.}
+  \item{expr}{character string giving the keyword in the names of the expression intensity columns.}
+  \item{other.columns}{character vector giving the keywords in the names of extra columns required, such as "Detection", "Avg_NBEADS", "BEAD_STDEV" etc. Each keyword corresponds to one type of columns. The detection p value columns will be read in by default.}
+  \item{sep}{the field separator character.}
+  \item{quote}{character string of characters to be treated as quote marks.}
+  \item{verbose}{logical, \code{TRUE} to report names of profile files being read.}
+  \item{\dots}{any other parameters are passed on to \code{\link{read.columns}}.}
   }
 \details{
 Illumina BeadStudio ouputs probe intensities (regular probe intensities) and control probe intensities to summary probe profile files (containing regular probes) and summary control probe profile files, respectively.
@@ -59,8 +59,10 @@ An \code{\link{EListRaw-class}} object with the following components:
 
 \examples{
 \dontrun{
-x <- read.ilmn(files="sample probe profile.txt",ctrlfiles="control probe profile.txt")
+x <- read.ilmn(files="sample probe profile.txt",
+               ctrlfiles="control probe profile.txt")
 }
+# See neqc and beadCountWeights for other examples using read.ilmn
 }
 
 \keyword{IO}
diff --git a/man/voom.Rd b/man/voom.Rd
index c0c1d8e..f0d88ac 100644
--- a/man/voom.Rd
+++ b/man/voom.Rd
@@ -51,6 +51,7 @@ An \code{\link[limma:EList]{EList}} object with the following components:
 Law, CW (2013).
 \emph{Precision weights for gene expression analysis}.
 PhD Thesis. University of Melbourne, Australia.
+\url{http://repository.unimelb.edu.au/10187/17598}
 
 Law, CW, Chen, Y, Shi, W, Smyth, GK (2013).
 Voom! Precision weights unlock linear model analysis tools for RNA-seq read counts.
diff --git a/man/vooma.Rd b/man/vooma.Rd
index 9549262..1b6157c 100644
--- a/man/vooma.Rd
+++ b/man/vooma.Rd
@@ -52,4 +52,5 @@ An EList object with the following components:
 Law, C. (2013).
 \emph{Precision weights for gene expression analysis}.
 PhD Thesis. University of Melbourne, Australia.
+\url{http://repository.unimelb.edu.au/10187/17598}
 }
diff --git a/inst/doc/limma.Rnw b/vignettes/intro.Rnw
old mode 100755
new mode 100644
similarity index 89%
rename from inst/doc/limma.Rnw
rename to vignettes/intro.Rnw
index 6214eef..88f952a
--- a/inst/doc/limma.Rnw
+++ b/vignettes/intro.Rnw
@@ -1,4 +1,4 @@
-%\VignetteIndexEntry{Limma Vignette}
+%\VignetteIndexEntry{Limma One Page Introduction}
 %\VignetteDepends{}
 %\VignetteKeywords{microarray linear model}
 %\VignettePackage{limma}
@@ -12,9 +12,9 @@
 \headsep=0in
 
 \begin{document}
-\title{Limma Package Vignette}
+\title{Limma Package Introduction}
 \author{Gordon Smyth}
-\date{23 October 2004}
+\date{23 October 2004, Revised 21 October 2013}
 \maketitle
 
 Limma is an R package for the analysis of gene expression microarray data, especially the use of linear models for analysing designed experiments and the assessment of differential expression.

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-limma.git



More information about the debian-med-commit mailing list