[BioC] Extract genes for a GO term in GOstat
Steve Lianoglou
mailinglist.honeypot at gmail.com
Thu Jun 3 15:22:05 CEST 2010
Hi,
On Thu, Jun 3, 2010 at 9:03 AM, James W. MacDonald
<jmacdon at med.umich.edu> wrote:
> Hi Rohit,
>
> Rohit Farmer wrote:
>>
>> Hi everyone i did a GO enrichment analysis using GOstat package for around
>> 112 genes and got 80 go terms enriched in BP ontology ... but the results
>> are not showing what are the genes that are associated with a particular
>> GO
>> term ... command used are as followd
>>
>> library("hgu133plus2.db")
>> allg <- get("hgu133plus2ENTREZID")
>> allg <- as.data.frame(unlist(as.list(allg)))
>> entrez.ids <- unique(allg[rownames(dat.s),])
>>
>> params <- new("GOHyperGParams", geneIds=entrez.ids,
>> annotation=c("hgu133plus2"), ontology="BP", pvalueCutoff=0.05,
>> conditional=FALSE, testDirection="over")
>> resultBP<-hyperGTest(params)
>
> probesets <- probeSetSummary(resultBP)
>
> See ?probeSetSummary for more info.
Also, in some cases `geneIdsByCategory` could be useful as well. You
can use it to extract the entrez ids of the genes that you find
enriched from your HyperGResult, eg. assuming you found "GO:0010468"
being enriched in your test:
R> regulate.gene.expression <- geneIdsByCategory(resultBP, 'GO:0010468')
will provide you with which genes those are.
I thought I'd just mention it, since "knowing is half the battle" ...
and it's not mentioned in the "See Also" section of probeSetSummary
(shouldn't it be?), so you might not find it straight away.
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the Bioconductor
mailing list