Thank you, this works quite well.  I wish topGO had a prettier way of
printing out the results similar to GOstats, though.

Cheers,
Paul

On Sun, Dec 19, 2010 at 2:59 PM, Valerie Obenchain <vobencha@fhcrc.org>wrote:

> Hi Paul,
>
>
> On 12/17/10 13:41, Paul Rigor wrote:
>
>>  Hello,
>>
>> So I'm working on extracting IDs from a topGO result object. I have a
>> list of terms ranked by p values (using classic fisher test). However,
>> does the result object
>> contain indices to the original list of gene ids per go term? The
>> documentation was a bit unclear.
>>
>> Using the printGenes function and specifying the top ranked GO terms,
>> I'd like to only pull the genes from my gene list, not from the entire
>> GO annotation table, which seems to be the default behavior for this
>> function.
>>
>>
> Using the example from the topGO vignette,
>
>    sampleGOdata <- new("topGOdata", description = "Simple session",
> ontology = "BP",
>         allGenes = geneList, geneSel = topDiffGenes, nodeSize = 10, annot =
> annFUN.db,
>         affyLib = affyLib)
>
>    resultFisher <- runTest(sampleGOdata, algorithm = "classic", statistic =
> "fisher")
>
>
> Create a map of geneIDs to GO terms,
>
>    ann.genes <- genesInTerm(sampleGOdata)
>    str(ann.genes)
>
> Select a few GO terms from the Fisher analysis (you could sort these first
> or ...),
>
>     fisher.go <- names(score(resultFisher))[1:5]
>     fisher.ann.genes <- genesInTerm(sampleGOdata, whichGO=fisher.go)
>     fisher.ann.genes
>
> The fisher.ann.genes list give you the  gene ID / GO term mapping subset on
> the GO terms from the Fisher analysis. You can also use printGenes on this
> subset of GO terms,
>
>    ft <- printGenes(sampleGOdata, whichTerms=fisher.go, chip="hgu95av2.db")
>
>
>
> Valerie
>
>  Thanks,
>> Paul
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>>
>
>

	[[alternative HTML version deleted]]

