These are Matlab software (together with some examples) for 
doing DWD based Systematic Bias Adjustment for Microarray
data.

The main function is in the file:   BatchAdjustSM.m

A test program, that illustrates several ways to call this 
function is in the file:   BatchAdjustSMtest.m

The function requires a number of different subroutines, so 
it is recommended that the full subdirectory structure be 
downloaded.  This may be easiest to do by downloading and 
expanding the file:   BatchAdjust.zip
Which is web accessible at:
http://genome.unc.edu/pubsup/dwd/BatchAdjust.zip
or alternatively at:
http://www.unc.edu/depts/statistics/postscript/papers/marron/GeneArray/BatchAdjust.zip

The program BatchAdjustSMtest.m contains several parts.

itest == 1, gives a simple example of an application to a
real data set (removing a simple binary source effect).

itest == 2, gives a more complex example, that requires
several applications of BatchAdjustSM.m, (removing both a
binary source effect, and also a 3 class batch effect).

itest == 100,...,120 were used to test various aspects of 
the function, and are probably not needed for most 
practical purposes.

Some additional notes:

i.  When running itest == 1 or itest == 2, the first part 
of the program is a fairly complicated read in of the 
data from an Excel spreadsheet.

ii.  The itest == 1 example is a single application, so 
the call is quite simple.

iii.  The itest == 2 example is more complex because:

  a.  Several applications are needed to handle the 
  complex source and batch effects being addressed.

  b.  There is also a part for printing the adjusted data
  out to a tab delimited text file.

iv.  Copy and modify the program as needed for other 
tasks.

iv.  E.g. To write a program that gives tab delimited text 
output for a simple example (such as itest == 1), copy the 
block of text that does the output, and modify 
appropriately.

v.  The paper proposing DWD batch adjustment is:
Adjustment of systematic microarray data biases
Monica Benito, Joel Parker, Quan Du, Junyuan Wu, Dong Xiang, 
Charles M. Perou, and J. S. Marron
Bioinformatics 2004 20: 105-114.
Web available at:
http://bioinformatics.oupjournals.org/cgi/content/abstract/20/1/105?etoc

vi.  The web page, with access to additional details, and 
access to the software is:
https://genome.unc.edu/pubsup/dwd/

