Hi All,

I was trying to do the hyperGTest using KEGG, and used the following script for testing:

----------------------
## TEST HYPERGTEST FOR KEGG

library("YEAST")
library("GOstats")
library("GO")

# Convert to a list
xx <- as.list(YEASTGENENAME)
# Remove probes that do not map to any GENENAME
xx <- xx[!is.na(xx)]
if(length(xx) > 0){
   # Gets the gene names for the first five probe identifiers
   xx[1:5]
   # Get the first one
   xx[[1]]
}

## Create gene universe
allGenes <- names(xx)
print(length(allGenes))
geneUniverse <- allGenes[1:800]
for(i in 1:20){
    ## Create random cluster of 13 genes
    geneCluster <- sample(1:800,13,replace=F)
    geneCluster <- geneUniverse[geneCluster]
    print(i)
    print(geneCluster)
    params <- new("KEGGHyperGParams", geneIds = geneCluster,
          universeGeneIds = geneUniverse, annotation = "YEAST",
           pvalueCutoff = 0.1, testDirection = "over")
    hgOver <- hyperGTest(params)
    dfrm <- summary(hgOver)
    #print(dfrm)
}
-----------------------

Frequently, I get the following error/output:

...
[1] 6
 [1] "YML051W" "YML059C" "YDR192C" "YLR315W" "YMR267W" "YAR027W" "YGR138C" "YNL188W" "YFR022W" "YFR025C" "YMR286W" "YFR041C" "RPC80"  
[1] 7
 [1] "YBR121C" "YJR104C" "YOR106W" "YOR132W" "EAM2"    "YCL009C" "YEL071W" "YJR118C" "YML059C" "TSM8740" "YHR092C" "YJR121W" "YFR019W"
[1] 8
 [1] "YCR081W" "YPR080W" "YKR035C" "YJL085W" "YHL025W" "YOR140W" "YFR040W" "YIL143C" "YKR039W" "CEN1"    "TS225"   "YPL010W" "YMR290C"
Error in numW - numWdrawn : non-numeric argument to binary operator


Do I need to do some further processing to the genes before I pass them into the params/hyperGTest function for KEGG?

thanks!






      ____________________________________________________________________________________
Like movies? Here's a limited-time offer: Blockbuster Total Access for one month at no cost. 

	[[alternative HTML version deleted]]

