
Hi,
I tried to find the genes in some of significant GO categories, and find out Counts of EntrezIDs returned from summary() are not same as the numbers of entrezIDs extracted from probeSetSummary() for some significant GO categories. My question is whether they should be same.
Here is the code I used,

library(GOstats)
.
.
.
>siggeneENID<-mget(siggene, envir=hgu133aENTREZID)
>siggeneENID<-unique(siggeneENID)
>siggeneENID<-siggeneENID[!is.na(siggeneENID)]
>univ <- unlist(as.list(hgu133aENTREZID))
>univ<-unique(univ)
>univ<-univ[!is.na(univ)]
>params <- new("GOHyperGParams", geneIds=siggeneENID, >universeGeneIds=univ,ontology="BP",annotation="hgu133a",conditional=TRUE, testDirection="over")
>hgOver<-hyperGTest(params)
>mysummary<-summary(hgOver)
>myprobeSetSummary<-probeSetSummary(hgOver,0.001)

# method1: get EntrezID "Count" for top 8 significant GO categories
>mysummary[1:10,"Count"]
 [1]   55  677   80 1387  671   35  118   27

# method2: get EntrezID count by using probeSetSummary for top 8 significant GO categories
> length(unique((as.data.frame(myprobeSetSummary[1]))[,1]))
[1] 55
> length(unique((as.data.frame(myprobeSetSummary[2]))[,1]))
[1] 677
> length(unique((as.data.frame(myprobeSetSummary[3]))[,1]))
[1] 80
> length(unique((as.data.frame(myprobeSetSummary[4]))[,1]))
[1] 1678
> length(unique((as.data.frame(myprobeSetSummary[5]))[,1]))
[1] 735
> length(unique((as.data.frame(myprobeSetSummary[6]))[,1]))
[1] 35
> length(unique((as.data.frame(myprobeSetSummary[7]))[,1]))
[1] 118
> length(unique((as.data.frame(myprobeSetSummary[8]))[,1]))
[1] 27

> sessionInfo()
R version 2.4.1 (2006-12-18)
i686-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] "splines"   "tools"     "stats"     "graphics"  "grDevices" "utils"
[7] "datasets"  "methods"   "base"

other attached packages:
   hgu133a    GOstats   Category genefilter   survival       KEGG       RBGL
  "1.14.0"    "2.0.4"    "2.0.3"   "1.12.0"     "2.30"   "1.14.1"   "1.10.0"
  annotate         GO      graph       affy     affyio    Biobase
  "1.12.1"   "1.14.1"   "1.12.1"   "1.12.2"    "1.2.0"   "1.12.2"
>
>From this test, the fourth and fifth GO categories got different numbers of EntrezIDs. Should these two methods return same number of EntrezIDs? or I misunderstand here? If they should not be same, which is correct one?

Thanks for any help!

Ren

	[[alternative HTML version deleted]]

