Affymetrix Facility Documentation
 
Affy Facility Docs Home
Running Chips
Pricing
Sample Submission
SBEAMS
Download Data
Annotate Samples
GetExpression
Get Affy Intensity
Analize Data
Analysis Pipeline
MEV
Affy Help Pages
Affy Core Help
SBEAMS Help Pages
Analysis Help Pages
Tutorials and Presentations
Other Resources
Affymetrix Home Page

Bioconductor Affy RMA and t-test Anaylsis

The user would like to pre-process and test for differential expression between groups of chips


Steps to obtain CEL files for your project

1)Log in to SBEAMS/Microarray
2)Choose the 'Project Home' button on the left side of the screen
3)Choose the 'Data Download' tab along the top of the page
4)Make sure you have the appropriate project selected in the project chooser drop-down on the top of the page--you should see your Affy chips listed on the page
5)Check the box under CEL for each chip you'd like to analyze
6)Click the 'GET_AFFY_ARRAY_FILES' button underneath the chip listing, and save these somewhere on your computer.
7)Unzip the downloaded file to get the actual CEL files.
Open Link
Use the following steps to set up and run R/Bioconductor:

1)R can be downloaded from
2)Bioconductor packages can be installed by running within R:

source("http://www.bioconductor.org/getBioC.R")
getBioC()
3)Use the following code to load in CEL files:
library(affy)
# need to substitute in name of directory to which CEL files were saved from SBEAMS
setwd("/path/to/CEL/files")
fn = c("20040630_01_G85_A_yf.CEL","20040630_03_G85_B_yf.CEL",
"20040630_05_G85_C_yf.CEL","20040630_02_G85_A_ff.CEL","20040630_04_G85_B_ff.CEL",
"20040630_06_G85_C_ff.CEL","20040629_01_G85_A_ffLiq.CEL",
"20040629_02_G85_B_ffLiq.CEL","20040630_07_G85_C_ffLiq.CEL",
"20040719_01_G85_D_yf.CEL","20040719_02_G85_E_yf.CEL","20040719_03_G85_F_yf.CEL")
eset <- justRMA(filenames = fn)
4)Perform t-tests and output results with:
Matrix <- exprs(eset)
get.pval.ttest <- function(dataf,index1,index2,
		           datafilter=as.numeric){
  f <- function(i) {
    return(t.test(datafilter(dataf[i,index1]),
           datafilter(dataf[i,index2]))$p.value)
  }
  return(sapply(1:length(dataf[,1]),f))
}
# compare chips 1-3 vs 4-6
pValues <- get.pval.ttest(Matrix,1:3,4:6)
orders <- order(pValues)
ordered.data <- cbind(rownames(Matrix)[orders],Matrix[orders,],
                        pValues[orders])
write.table(ordered.data,file="U:/G85_yf_vs_ff.txt",sep="\t")
# compare chips 1-3 vs 7-9
pValues <- get.pval.ttest(Matrix,1:3,7:9)
orders <- order(pValues)
ordered.data <- cbind(rownames(Matrix)[orders],Matrix[orders,],
                        pValues[orders])
write.table(ordered.data,file="U:/G85_yf_vs_ffLiq.txt",sep="\t")
# compare chips 4-6 vs 7-9
pValues <- get.pval.ttest(Matrix,4:6,7:9)
orders <- order(pValues)
ordered.data <- cbind(rownames(Matrix)[orders],Matrix[orders,],
                        pValues[orders])
write.table(ordered.data,file="U:/G85_ff_vs_ffLiq.txt",sep="\t")
# compare chips 1-3 vs 10-12
pValues <- get.pval.ttest(Matrix,1:3,10:12)
orders <- order(pValues)
ordered.data <- cbind(rownames(Matrix)[orders],Matrix[orders,],
                        pValues[orders])
# substitute in where you’d like to save the results
write.table(ordered.data,file="/output/path /G85_yf_vs_yf.txt",sep="\t")
5)Manually added in annotations by sorting each result file by affy ID, sorting annotation file /net/arrays/Affymetrix/library_files/YG_S98_annot.csv by affy ID, and then copying columns with Transcript ID, Gene Title, Gene Symbol into result files.