[BioC] Fishers Exact test, hyperGTest - GO analysis ... contd..

James W. MacDonald jmacdon at med.umich.edu
Fri Nov 30 00:31:43 CET 2007


Hi Srinivas,

There is a vignette in the GOstats package that shows how to do what you 
ask. However, it is slightly easier these days if you use one of the new 
SQLite annotation packages.

 > library(hgu95av2.db)
 > library(GOstats)
 > hasGO <- toTable(hgu95av2GO)[,1]
 > univ <- unique(getEN(prbs, "hgu95av2"))

Note that you also want to choose only those probesets in your 
significant set that both have GO symbols appended, and have Entrez Gene 
IDs. Say myprbs is a vector of interesting probeset IDs:

 > hasGOprbs <- myprbs[myprbs %in% hasGO]
 > geneIds <- getEN(hasGOprbs, "hgu95av2")
 > geneIds <- geneIds[!duplicated(geneIds)]
 > param <- new("GOHyperGParams", geneIds=geneIds, universeGeneIds=univ, 
annotation="hgu95av2", ontology="MF", conditional=TRUE)
 > hypt <- hyperGTest(param)

Note: typed from memory and not tested since I don't have R on my home 
comp right now, and there may be typos since this cat keeps wanting 
attention ;-D

Best,

Jim



Srinivas Iyyer wrote:
> hello:
>
> In my previous question I asked about hyperGTest and
> Fishers exact test.  I do not know if any functions
> are available to do fishers exact test
> in bioconductor. 
>
>
> I am trying using a sample code given as an example,
> which appears mostly deprecated. 
>
>
>
>
> #### reprinted from JSM2005 James Wettenhall. August
> 6-7, 2005 lab session####
>
> Here estrogen dataset was used. 
>
>
>
> library(hgu95av2)
>  geneIDs <- ls(hgu95av2cdf)
>  LocusLinkIDs <-
> as.character(unlist(lapply(mget(geneIDs,env=hgu95av2LOCUSID),
>      function (LL.ID) { return(paste(LL.ID,collapse=";
> ")) } )))
>  topLocusLinkIDs <- LocusLinkIDs[top50.Est10]
>  topLocusLinkIDs <-
> topLocusLinkIDs[topLocusLinkIDs!="NA"]
>
> library(GOstats)
>  goHyperG <- GOHyperG(unique(topLocusLinkIDs),
> lib="hgu95av2", what="MF")
>  # MF is an abbreviation for "Molecular Function".
>  # See ?GOHyperG for more information.
>  names(goHyperG)
>  bestGOs <- goHyperG$pvalues[goHyperG$pvalues < 0.2]
>
>
>
>
>
> Now that GOHyperG is deprecated, I tried to modify the
> code and I do not understand entrezUniverse.
> How entrezUniverse can be obtained for this estrogen
> example dataset. 
>
>
> ######
> Modification according to new hyperGTest:
>
> library(GOstats)
> gparams <- new("GOHyperGParams", geneIDs =
> topLocusLinkIDs, universeGeneIDs = entrezUniverse,
> annotation="hgu95av2",ontology='MF',pvalueCutoff =
> hgCutoff, conditional =FALSE, testDirection = "over")
>
> hgOver <- hyperGTest(gparams)
>
> Can some one help me please, of hot to get
> entrezUniverse for Estrogen dataset. 
>
> Thanks
>
>
>       ____________________________________________________________________________________
> Be a better pen pal.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list