[BioC] hyperGTest(GOstats) result question
Seth Falcon
sfalcon at fhcrc.org
Mon Jul 9 23:20:35 CEST 2007
Hi Burak,
burak kutlu <burak_kutlu at yahoo.com> writes:
> Hello
> I am using hyperGTest to look at the GO enrichments. I am confused
> with the output of the test. For a test, I took the genes in my
> matrix, and found the those that map to GO:0009790 (there are 8 such
> genes). Then I ran hyperGTest: using the 8 genes as the input, the
> genes in my matrix as the universe genes (it is a subset of the
> genes represented in the hgu133plus2 ).
First, I'm a bit confused about what you are trying to accomplish.
Usually, hyperGTest is used to find potentially interesting GO terms.
Here it seems you are starting with a GO term of interest -- or are
you just trying to understand/test hyperGTest?
> When I look at the results, the count field is = 3. I would expect
> it to be 8. This probably changes the outcome. Am I missing
> something?
> I include the code below as well as the sessionInfo() output.
> Any help is appreciated.
I wonder if you could provide a reproducible example? If you can send
me off list the myGenes and universeGenes, perhaps I can see what you
are seeing.
A few comments on your code below...
> universeGeneIds = rownames(myMatrix)
> genesWithMyGO = as.list(GOALLENTREZID)$'GO:0009790'
How about:
genesWithMyGO = GOALLENTREZID[["GO:0009790"]]
But the GO::GOALLENTREZID map is odd in that it contains data across
different organisms. Why not instead:
affyWithMyGO = hgu133plus2GO2ALLPROBES[["GO:0009790"]]
egWithMyGO = unique(unlist(mget(affyWithMyGO, hgu133plus2ENTREZID)))
> geneIds = intersect(genesWithMyGO, universeGeneIds) # there are 8 genes that are in my matrix with this GO id
>
>> geneIds
> [1] "3084" "4683" "5801" "650" "9314" "89870" "2139" "3216"
>
> params = new("GOHyperGParams", geneIds = mygenes, universeGeneIds =
Did you intend to use geneIds instead of mygenes here?
> hyp = hyperGTest(params)
> t = summary(hyp)
> tRep = cbind(t$GOBPID,t$Pvalue,t$OddsRatio,t$ExpCount,t$Count,t$Size,t$Term)
> test = tRep[which(tRep[,1]=='GO:0009790'),] # enrichment result with this term
> names(test) = c(
> "GOBPID","Pvalue","OddsRatio","ExpCount","Count","Size","Term")
Why not:
t["GO:0009790", ]
+ seth
--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org
More information about the Bioconductor
mailing list