-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCelFileNormalization.R
More file actions
42 lines (29 loc) · 842 Bytes
/
Copy pathCelFileNormalization.R
File metadata and controls
42 lines (29 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
### Allie provided
source("http://bioconductor.org/biocLite.R")
#LOAD DATABASE AND AFFY LIBRARY
biocLite("ath1121501.db")
biocLite("affy")
biocLite("biobase")
#USE AFFY LIBRARY
require(affy)
#READ FILES
Data <- ReadAffy()
pData(Data)
#make a boxplot to look at the data
boxplot(Data)
#load phenodata file
pd <- read.AnnotatedDataFrame("Gifford_CELfilestokeep_PhenoData.txt")
phenoData(Data) <- pd
pData(pd)
#normalize data
nData <- rma(Data)
#look at normalized data
boxplot(exprs(nData),main="normalized data")
tnData <- t(as.data.frame(nData))
##write.csv(tnData, file="tnData.csv")
head(tnData)
#remove genes that are not expressed - threshold based per dataset
lowExprThresh = 6
rmvRows = apply (tnData, 1, function(x){all( x < lowExprThresh)})
enData = tnData[!rmvRows,]
write.csv(enData, file="Treatment_tnData_NOV26.csv")