Hi Greg,
It doesn't really matter what you think should happen, nor what the
theory might be. What matters is how the code works and what the
requirements are. In this case the code requires that you pass in an
annotation package name, which is then used to map the Entrez Gene IDs
to GO terms.
You are expecting the GOstats package to take your Entrez Gene IDs and
then somehow look them up and figure out what the species might be,
against all evidence to the contrary. I suppose this could
hypothetically be done, but that isn't how the code works. So if you
look at the vignette, you will see this:
params <- new("GOHyperGParams",
+ geneIds=selectedEntrezIds,
+ universeGeneIds=entrezUniverse,
+ annotation="hgu95av2.db",
+ ontology="BP",
+ pvalueCutoff=hgCutoff,
+ conditional=FALSE,
+ testDirection="over")
Please note that both the universe AND the annotation package are
included. Now if we delve into the code, we can see that one of the
first steps in the hyperGTest function is to build the universe:
> GOstats:::.hyperGTestInternal
function (p)
{
p <- makeValidParams(p)
p at universeGeneIds <- universeBuilder(p)
and if we delve a bit deeper, we find this in the getUniverseViaGo
function
> getAnywhere(getUniverseViaGo)
A single object matching ?getUniverseViaGo? was found
It was found in the following places
namespace:Category
with value
function (p)
{
datPkg <- p at datPkg
ontology <- ontology(p)
entrezIds <- universeGeneIds(p)
ontology <- match.arg(ontology, c("BP", "CC", "MF"))
ontIds <- aqListGOIDs(ontology)
probe2go <- eapply(ID2GO(datPkg), function(goids) {
Now that ^^^^^^^^ line looks pretty close to your error, no?
So what exactly is p at datPkg?
> showClass("GOHyperGParams")
Class "GOHyperGParams" [package "Category"]
Slots:
Name: ontology conditional geneIds
universeGeneIds
Class: character logical
ANY ANY
Name: annotation datPkg categorySubsetIds
categoryName
Class: character DatPkg ANY
character
Name: pvalueCutoff testDirection
Class: numeric character
Extends: "HyperGParams"
It's the annotation package name that you neglected to include when
you
built your GOHyperGParams object. And just to check, to make super
sure
I am right,
> p <- new("GOHyperGParams", geneIds = "1", universeGeneIds =
c("1","2","3"), annotation = "org.Hs.eg.db")
> p at datPkg
An object of class "Org.XX.egDatPkg"
Slot "name":
[1] "org.Hs.eg"
So please try again, this time including the annotation package as I
suggested before.
Best,
Jim
On 5/9/2013 7:31 AM, gregory voisin wrote:
> HI Jim,
>
> In my mind , in GO term analysis theory : two arguments are
necessary
> : the genelist selection and the genelistUnivers.^The annotation
will
> be necessary only if the universeGeneIds is absent.
> After Gostats knows these submitted EntrezID are HUMAN but not the
> experiement is based on Agilent platform.
> Here , in this exemple : onto = "BP"
>
>
> See a previous mail to Dan with a complete example of data and code.
>
> Thansk for your help
> --------------------------------------------------------------------
----
> *De :* James W. MacDonald <jmacdon at="" uw.edu="">
> *? :* gregory voisin <voisingreg at="" yahoo.fr="">
> *Cc :* bioconductor <bioconductor at="" stat.math.ethz.ch="">
> *Envoy? le :* Mercredi 8 mai 2013 19h19
> *Objet :* Re: [BioC] serious problem with GOstats package
>
> Hi Greg,
>
> On 5/8/2013 11:38 AM, gregory voisin wrote:
> > Hi,?
> >
> > FOr my current analysis, I use GOstats package because it's a
good,
> basic, simple package.
> > I don't know why but since some time ,
> >
> > when I use this code:
> >
> > params<- new("GOHyperGParams", geneIds= sigLL, universeGeneIds =
> universeGeneIds , ontology=onto, pvalueCutoff=
> 0.01,conditional=FALSE,testDirection="over")
>
> You are missing the annotation argument.
>
> Best,
>
> Jim
>
>
> > ?
> > hgOver<- hyperGTest(params)
> >
> > I have this error message:
> >
> >
> > Erreur dans eapply(ID2GO(datPkg), function(goids) { :?
> > ? erreur d'??valuation de l'argument 'env' lors de la s??lection
> d'une m??thode pour la fonction 'eapply' : Erreur dans (function
> (classes, fdef, mtable) ? :?
> > ? unable to find an inherited method for function ???cols??? for
> signature ???"function"???
> >
> > I have tested with R2.15.1, 2.12.! always the same problem. I
think
> that the update of the package is sometimes problematic.
> >
> >
> > If you have a solution, a suggestion or an alternative ( I'm going
> to see topGO)
> >
> > ?
> >
> > Thanks for your help
> >
> >
> >> sessionInfo()
> > R version 3.0.0 (2013-04-03)
> > Platform: x86_64-w64-mingw32/x64 (64-bit)
> >
> > locale:
> > [1] LC_COLLATE=French_Canada.1252 ? LC_CTYPE=French_Canada.1252 ?
?
> LC_MONETARY=French_Canada.1252
> > [4] LC_NUMERIC=C ? ? ? ? ? ? ? ? ?
> LC_TIME=French_Canada.1252 ? ?
> >
> > attached base packages:
> > [1] parallel ? stats ? ? graphics ? grDevices utils ? ?
datasets
> ? methods ? base ? ? ?
> >
> > other attached packages:
> > ? [1] hgu95av2.db_2.9.0 ? ? org.Hs.eg.db_2.9.0 ? ALL_1.4.14 ? ?
> ? ? ? topGO_2.12.0 ? ? ? ?
> > ? [5] SparseM_0.99 ? ? ? ? GO.db_2.9.0 ? ? ? ? ?
> GOstats_2.26.0 ? ? ? RSQLite_0.11.3 ? ? ?
> > ? [9] DBI_0.2-6 ? ? ? ? ? ? graph_1.38.0 ? ? ? ?
> Category_2.26.0 ? ? ? AnnotationDbi_1.22.5
> > [13] Biobase_2.20.0 ? ? ? BiocGenerics_0.6.0 ? limma_3.16.3 ?
> ? ? ? BiocInstaller_1.10.1
> >
> > loaded via a namespace (and not attached):
> > ? [1] annotate_1.38.0 ? ? ? AnnotationForge_1.2.1
> genefilter_1.42.0 ? ? grid_3.0.0 ? ? ? ? ? ?
> > ? [5] GSEABase_1.22.0 ? ? ? IRanges_1.18.0 ? ? ? ?
> lattice_0.20-15 ? ? ? RBGL_1.36.2 ? ? ? ? ?
> > ? [9] splines_3.0.0 ? ? ? ? stats4_3.0.0 ? ? ? ? ?
> survival_2.37-4 ? ? ? tools_3.0.0 ? ? ? ? ?
> > [13] XML_3.96-1.1 ? ? ? ? ? xtable_1.7-1 ? ? ? ? ?
> > [[alternative HTML version deleted]]
> >
> >
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor at r-project.org <mailto:bioconductor at="" r-project.org="">
> >
https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
>
http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> --
> James W. MacDonald, M.S.
> Biostatistician
> University of Washington
> Environmental and Occupational Health Sciences
> 4225 Roosevelt Way NE, # 100
> Seattle WA 98105-6099
>
>
>
--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099