Changes

Jump to: navigation, search

Using Bioconductor To Analyse Microarray Data

1,814 bytes added, 15:34, 2 September 2009
m
no edit summary
[[Category:R]]
[[Category:Bioinformatics]]
[[Category: Bioconductor]]
==Software Requirements==
*Bioconductor packages. Install as needed:
**Biobase
**GEOquery- [http://www.bioconductor.org/packages/1.8/bioc/html/GEOquery.html]**Limma
<pre>
source("http://www.bioconductor.org/biocLite.R")
library(GEOquery)
</pre>
*Load data (can Can load:
**datasets - '''GDS'''
**measurements - '''GSM'''
**platforms - '''GPL'''
**series - '''GSE''')
<pre>
gds <- getGEO("GDS162GDS2946") #load GDS162 datasetMeta(gds) #show extracted meta datatable(gds)[1:10,] #show first ten rows of dataseteset <- GDS2eSet(gds, do.log=TRUE) #convert to expression set, by default obtains annotation (GPL) data with log2 transformationpData(eset) #phenotype datasampleNames(eset) #sample names (GSM)</pre>*see [[http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/r/geo/ Peter Cock's Page]] or [[http://www.bioconductor.org/packages/1.8/bioc/html/GEOquery.html 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 [[http://www.bioconductor.org/packages/2.3/bioc/vignettes/limma/inst/doc/usersguide.pdf limma User Guide]]<pre>library(limma) #load limma packagelibrary(affyPLM) #load affyPLM packageeset.norm <- normalize.ExpressionSet.quantiles(eset) #normalize expression set by quantile methodpData(eset) #to see phenotype annotation datadesign=model.matrix(~ -1+factor(c(1,1,1,1,1,1,1,2,2,2,2,2,2,2,2) #set design matirxcolnames(design) <- c("obese","lean") # give names to the treatment groupsdesign #check the design matrixfit <- lmFit(eset.norm, design) #Fit data to linear modelcont.matrix <- makeContrasts(Obese.vs.Lean=obese-lean, levels=design)fit.cont <- contrasts.fit(fit, cont.matrix)fit.cont.eb <- eBayes(fit.norm) #Empirical Bayeswrite.csv(fit.cont.eb, file="filename.csv") #write to CSV file</pre> ==Clustering Analysis==Bioconductor packages can calculate distance matrices:<pre>hc <- hclust(dist(t(exprs(eset.norm))))plot(hc)
</pre>

Navigation menu