The latest version of the sva package is now available at Bioconductor:

http://bioconductor.org/packages/release/bioc/html/sva.html

This version includes support for both surrogate variable analysis, as
described in the papers:

http://www.biostat.jhsph.edu/~jleek/papers/sva.pdf
http://www.biostat.jhsph.edu/~jleek/papers/framework.pdf

and for Combat, an approach for removing batch effects when the source of
batch is known as described in the paper:

http://biostatistics.oxfordjournals.org/content/early/2006/04/21/biostatistics.kxj037.full.pdf

A full description of how to use the methods, including how to use the sva
package with limma, removing batch effects with linear models, biological
versus technical batch effects, direct adjustment versus surrogate variable
adjustment, and batch effects for prediction is available here:

http://bioconductor.org/packages/2.9/bioc/vignettes/sva/inst/doc/sva.pdf

Several recent questions have focused on removing batch effects from gene
expression or other high-throughput data as a cleaning step prior to
performing other analyses. An important point about batch effect correction
(whether with sva, combat, or any other currently published approach) is
that a regression analysis is performed and variation is removed from the
data. So subsequent analyses using a "cleaned" version of the data should
be performed with caution. In particular, methods use to infer networks or
to illustrate patterns (MDS/PCA) should be used with caution after
regressing out batch effects. All currently published batch effect removal
methods focus on adjusting batch effects for differential expression.

That being said, the sva package can be used to "clean" a data set as
follows: (1) use the sva() function as described in the vignette to run sva
and store the sva object. (2) input the data set into the fsva() function,
along with the model matrix used to define the sva object, and the
surrogate variable object. The db variable that is returned from this
command will be a "clean" version of the original data set.

	[[alternative HTML version deleted]]

