Using Bioconductor To Analyse Microarray Data: Difference between revisions

Line 36: Line 36:


==Microarray Analysis==
==Microarray Analysis==
*set up design matrix.  Use a different integer for each treatment group.
*set up design matrix.  Use a different integer for each treatment group. The following example is for a contrast between the first four groups and the last four groups.  For details on other design matrices see chapter 8 of [[http://www.bioconductor.org/packages/2.3/bioc/vignettes/limma/inst/doc/usersguide.pdf limma User Guide]]
<pre>
<pre>
pData(eset)  #to see phenotype annotation data
pData(eset)  #to see phenotype annotation data
design <- model.matrix(~0+factor(c(1,1,1,1,2,2,2,2)),eset)  #for four replicates of each treatment group
design <- model.matrix(~(c(0,0,0,0,1,1,1,1)),eset)  #for four replicates of each treatment group,
colnames(design) <- c("resistant","sensitive")  # give names to the treatment groups
colnames(design) <- c("resistant","sensitive")  # give names to the treatment groups
design  #check the design matrix
design  #check the design matrix
</pre>
</pre>