Information Technology Reference
In-Depth Information
1 # load required packages
2
library(”Biobase”)
3
library(”affy”)
4
library(”AffyExpress”)
5
library(”limma”)
6
library (”hgu95av2 .db”)
7
library(”XML”)
8
library (”annotate”)
9
10 # load input data
11 celpath <− ”spikein/”
12 phenodatafile <− ”spikein pdata . txt”
13 phenodata <− read. table(phenodatafile , row.names = 1, header
= TRUE, sep = ””)
affybatch <− ReadAffy( c e l f i l e . path=celpath , phenoData =
phenodata)
14
15
16 # AffyExpress : preprocessing
17
e xp r s e t <− pre. process(method = ”rma”, raw = affybatch , plot
=FALSE)
18
19 # AffyExpress : filtering
20 filteredexprset <
Filter(exprset , numChip = 3, bg = 7.0)
21
22 # differential expression analysis using limma
23
f i t <
lmFit(exprset)
24
f i t <
eBayes( fit )
25
t op t ab l e <−
topTable( fit , adjust = ”fdr”)
26
27 # get PubMed abstracts for top genes
28 genenames <− as. character(toptable$ID)
29 abstracts <− pm. getabst (genenames , ”hgu95av2”)
30 abstracts <− unlist(abstracts , recursive = FALSE)
31 pmAbst2HTML(abstracts , filename = ”spikein abstracts .html”,
frames = FALSE)
Fig. 6.3 R script performing a simple microarray data analysis
The code listed in Figure 6.3 shows an R script that performs the described
analysis steps. At first, the required packages are loaded: Biobase is the fun-
damental package of Bioconductor [105], containing standardized data struc-
tures for the representation of genomic data. Most importantly here, it defines
the ExpressionSet class [93], which conveniently manages different data from
microarray experiments: assayData (the actual expression data), phenoData
(meta-data on the samples), featureData and annotation s(meta-dataon
the used chip or technology), protocolData (technical information about sam-
ple processing) and experimentData (flexible description of the experiment).
The affy package [102] provides functionality for the processing of Affymetrix
GeneChip data, for instance a function for reading the raw data from
Affymetrix GeneChip experiments into an AffyBatch object that serves as
basis for the subsequent preprocessing steps. AffyExpress [350] contains
 
Search WWH ::




Custom Search