-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex00.R
48 lines (36 loc) · 958 Bytes
/
ex00.R
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
43
44
45
46
47
48
setwd("C:/Users/Yered/Dropbox/CdeC")
# Working Directory
wd <- getwd()
basedir <- paste0(wd, "/celfiles")
setwd(basedir)
# Load sample information
library(affy)
tab <- read.delim("sampleinfo.txt",check.names=FALSE,as.is=TRUE)
rownames(tab) <- tab$filenames
tab
# List raw files
fns <- list.celfiles()
fns
fns %in% tab[,1]
# read in CEL files
ab <- ReadAffy(phenoData=tab)
dim(pData(ab))
# Platform
annotation(ab)
# Processing
e <- rma(ab)
# Dettach affy package to load oligo package
detach("package:affy")
library(oligo)
# set wd and load sample info
basedir <- paste0(wd,"/celfiles")
setwd(basedir)
tab <- read.delim("sampleinfo.txt",check.names=FALSE,as.is=TRUE)
# list files
fns <- list.celfiles(listGzipped=TRUE)
fns %in% tab[,1]
# read & process data
pd <- as(tab, "AnnotatedDataFrame")
efs <- read.celfiles(filenames=tab[,1],phenoData=pd,sampleNames=sampleNames(pd))
setwd(wd)
e <- rma(efs)