[BioC] topTable changes
Sue Jones
s.jones at sussex.ac.uk
Thu Aug 30 18:30:24 CEST 2007
I have used the following code to find differentially expressed genes
: based on affymetrix data when treating cells with water (controls) and
ethanol (treatment).
files <- c("W05h_1.CEL", "W0h_1.CEL", "W2h_1.CEL",
"W2h_2.CEL", "W4h_1.CEL", "E2h_1.CEL", "E2h_2.CEL",
"E2h_3.CEL", "E2h_4.CEL")
Data <- ReadAffy(filenames = files)
Data_gcrma <- gcrma(Data)
design<- cbind(WAT=c(1,1,1,1,1,0,0,0,0), ETH=c(0,0,0,0,0,1,1,1,1))
design
fit <- lmFit(Data_gcrma,design)
cont.matrix <- makeContrasts(WATvsETH=ETH-WAT, levels=design)
fit2<- contrasts.fit(fit,cont.matrix)
fit3 <- eBayes(fit2)
tab <- topTable(fit3, n=1500, adjust="fdr")
genenames <- as.character(tab$ID)
ll <- getLL(genenames, "drosgenome1")
sym <- getSYMBOL(genenames, "drosgenome1")
tab2 <- data.frame(sym,tab)
diff_exp <- tab2[tab2$P<0.05 & tab2$M<0.0,]
print("No down reg genes:"); length(diff_exp$ID)
diff_exp <- tab2[tab2$P<0.05 & tab2$M>0.0,]
print("No up reg genes:") ;length(diff_exp$ID)
The question I have is about the topTable function. Does this now only
produce a P.value column which contains the adjusted P-values and is this
column tagged as "P"? Are the two lines of code that extract the genes
with P values <0.05 correct?
diff_exp <- tab2[tab2$P<0.05 & tab2$M<0.0,]
print("No down reg genes:"); length(diff_exp$ID)
previously I had code which used $adj.P.Val as a filter but this does not
work any more.
Thanks
Sue Jones
University of Sussex
More information about the Bioconductor
mailing list