[BioC] GOstats: hyperGTest function

Seth Falcon sfalcon at fhcrc.org
Tue May 1 00:24:40 CEST 2007


Hi,

Edward Bolanger <ebolanger at yahoo.com> writes:
> I was trying to find if a cluster of genes were 'significant', and
> was using the hyperGTest function provided in GOstats. I am
> reproducing the code and the error below:


> ----------------------------------------------------------------------------------------------------------------
>> selGenes
> [1] "YCL019W" "YCL020W" "YER160C" "YJR026W" "YJR028W" "YML045W"
>> class(selGenes)
> [1] "character"
>>     library("GOstats")
>>     library("YEAST")
>>     set.seed(434)    
>>     allYeast <- ls(YEASTCHR)

Hmm, it doesn't look like any of selGenes are in your universe.  I
get:

    selGenes %in% allYeast
    [1] FALSE FALSE FALSE FALSE FALSE FALSE
    > 

>> p <- new("GOHyperGParams",
> +              geneIds=selGenes,
> +              universeGeneIds=allYeast,
> +              ontology="BP",
> +              annotation="YEAST",
> +              pvalueCutoff=0.05,
> +              testDirection="over",
> +              conditional=FALSE)
>>     ans <- hyperGTest(p)
> Error in order(na.last, decreasing, ...) : 
>         argument 1 is not a vector

That isn't such a helpul error message, but it also isn't the one I
get:

p <- new("GOHyperGParams",
+              geneIds=selGenes,
+              universeGeneIds=allYeast,
+              ontology="BP",
+              annotation="YEAST",
+              pvalueCutoff=0.05,
+              testDirection="over",
+              conditional=FALSE)
Error in makeValidParams(.Object) : no geneIds in universeGeneIdsFALSE
In addition: Warning message:
removing geneIds not in universeGeneIds in: makeValidParams(.Object) 

[Now this one looks like it could use some improvement as well, but
the no geneIds in uverseGeneIds part is actually fairly helpful I
think]

> For most of my clusters, I don't get errors. I suspect it is
> something to do with the genes in this particular cluster. If I put
> the same genes in sgd
> (http://db.yeastgenome.org/cgi-bin/GO/goTermFinder), and test them
> with the default gene universe (i.e the full complement of yeast
> genes), I don't get an error.

Presumably things work better when the genes you have selected are in
your universe of genes...

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org



More information about the Bioconductor mailing list