Hi,
I tried the code in section 11 "Gene Set Enrichment" on http://www.bioconductor.org/workshops/2005/BioC2005/labs/lab01/estrogen.html, the original code is:
1  known <- read.delim("knownERgenes.txt",as.is=TRUE)
2  knownERgenes <- known$UGCluster
3  predicted <- read.delim("predictedERgenes.txt",as.is=TRUE)
4  predictedERgenes <- predicted$UGCluster
5  library(hgu95av2)
6  unigene <- unlist(as.list(hgu95av2UNIGENE))
7  knownERgenesOnChip <- match(knownERgenes,unigene)
8  knownERgenesOnChip <- knownERgenesOnChip[!is.na(knownERgenesOnChip)]
9  predictedERgenesOnChip <- match(predictedERgenes,unigene)
10 predictedERgenesOnChip <- predictedERgenesOnChip[!is.na(predictedERgenesOnChip)]
11 geneSetTest(knownERgenesOnChip,fit2$t[,1],"two.sided")

Please correct me if I am wrong.
I think line 6 should be replaced by the following two lines:
geneIDs <- ls(hgu95av2cdf)
unigene <- as.character(unlist(lapply(mget(geneIDs,env=hgu95av2UNIGENE),
     function (unigeneID) { return(paste(unigeneID,collapse="; ")) } )))
the order of "unigene" from line 6 is not same as the order of the above "unigene"

otherwise knownERgenesOnChip is not indices of knownERgenes on fit2$t[,1].

Thanks in advance!

Ren


	[[alternative HTML version deleted]]

