Using Bioconductor To Analyse Microarray Data: Difference between revisions
Jump to navigation
Jump to search
| Line 38: | Line 38: | ||
*set up design matrix. Use a different integer for each treatment group. The following example is for a contrast between the first seven groups and the last eight 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]] | *set up design matrix. Use a different integer for each treatment group. The following example is for a contrast between the first seven groups and the last eight 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> | ||
library(limma) #load limma package | |||
pData(eset) #to see phenotype annotation data | pData(eset) #to see phenotype annotation data | ||
design <- model.matrix(~(c(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0)),eset) #for four replicates of each treatment group, | design <- model.matrix(~(c(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0)),eset) #for four replicates of each treatment group, | ||
Revision as of 01:01, 27 July 2009
Software Requirements
- R, get from [CRAN]
- Bioconductor, get from [Bioconductor]
- Bioconductor packages. Install as needed:
- Biobase
- GEOquery - [1]
source("http://www.bioconductor.org/biocLite.R")
biocLite("PACKAGE")
Obtaining GEO Datasets
- Open a R terminal
- Load Biobase and GEOquery packages
libary(Biobase) library(GEOquery)
- Can load:
- datasets - GDS
- measurements - GSM
- platforms - GPL
- series - GSE
gds <- getGEO("GDS162") #load GDS162 dataset
Meta(gds) #show extracted meta data
table(gds)[1:10,] #show first ten rows of dataset
eset <- GDS2eSet(gds, do.log=TRUE) #convert to expression set, by default obtains annotation (GPL) data with log2 transformation
pData(eset) #phenotype data
sampleNames(eset) #sample names (GSM)
- see [Peter Cock's Page] or [GEOquery Documentation] for more information.
Microarray Analysis
- set up design matrix. Use a different integer for each treatment group. The following example is for a contrast between the first seven groups and the last eight groups. For details on other design matrices see chapter 8 of [limma User Guide]
library(limma) #load limma package
pData(eset) #to see phenotype annotation data
design <- model.matrix(~(c(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0)),eset) #for four replicates of each treatment group,
colnames(design) <- c("resistant","sensitive") # give names to the treatment groups
design #check the design matrix
fit <- lmFit(eset,design)
fit.eb <- eBayes(fit)