[BioC] Error in summary(hyperGtest)

James W. MacDonald jmacdon at med.umich.edu
Mon Jul 13 22:57:11 CEST 2009


 > p <- new("GOHyperGParams", geneIds=as.numeric(geneIds), 
universeGeneIds=as.numeric(GeneIDUniverse), annotation="hgu133plus2.db", 
ontology="BP", pvalueCutoff=0.001, conditional=F, testDirection="over")
 > hyp <- hyperGTest(p)
 > hyp
Gene to GO BP  test for over-representation
652 GO BP ids tested (22 have p < 0.001)
Selected gene set size: 74
     Gene universe size: 12592
     Annotation package: hgu133plus2
 > summary(hyp)
        GOBPID       Pvalue  OddsRatio    ExpCount Count Size
1  GO:0009615 6.709096e-13  26.431053  0.60530496    12  103
2  GO:0051707 9.964367e-12  15.220988  1.19297967    14  203
3  GO:0009607 1.123924e-10  11.235085  1.71601017    15  292
4  GO:0051704 3.441994e-08   6.672310  3.01477128    16  513
5  GO:0006955 2.755437e-06   4.963045  3.67296696    15  625
6  GO:0050896 7.513094e-06   3.011330 14.39215375    31 2449
7  GO:0006952 1.018216e-04   4.187715  3.32036213    12  565
8  GO:0019441 1.018268e-04 347.694444  0.01763024     2    3
9  GO:0002376 1.485646e-04   3.433529  5.15978399    15  878
10 GO:0045110 2.028774e-04 173.833333  0.02350699     2    4
11 GO:0006569 3.368410e-04 115.879630  0.02938374     2    5
12 GO:0042436 3.368410e-04 115.879630  0.02938374     2    5
13 GO:0046218 3.368410e-04 115.879630  0.02938374     2    5
14 GO:0060052 3.368410e-04 115.879630  0.02938374     2    5
15 GO:0006334 3.917094e-04  12.948571  0.34672808     4   59
16 GO:0052547 4.451811e-04  12.492231  0.35848158     4   61
17 GO:0044419 5.214595e-04   5.484628  1.41629606     7  241
18 GO:0031497 5.348740e-04  11.864762  0.37611182     4   64
19 GO:0006576 6.367334e-04  11.297052  0.39374206     4   67
20 GO:0034728 6.735437e-04  11.119643  0.39961881     4   68
21 GO:0006568 7.019905e-04  69.516667  0.04113723     2    7
22 GO:0045109 9.324263e-04  57.925926  0.04701398     2    8
                                          Term
1                           response to virus
2                  response to other organism
3                 response to biotic stimulus
4                      multi-organism process
5                             immune response
6                        response to stimulus
7                            defense response
8  tryptophan catabolic process to kynurenine
9                       immune system process
10      intermediate filament bundle assembly
11               tryptophan catabolic process
12        indole derivative catabolic process
13          indolalkylamine catabolic process
14    neurofilament cytoskeleton organization
15                        nucleosome assembly
16           regulation of peptidase activity
17 interspecies interaction between organisms
18                         chromatin assembly
19           biogenic amine metabolic process
20                    nucleosome organization
21               tryptophan metabolic process
22         intermediate filament organization

 > sessionInfo()
R version 2.9.0 (2009-04-17)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
[1] GO.db_2.2.11          GOstats_2.10.0        graph_1.22.2
[4] Category_2.10.1       hgu133plus2.db_2.2.11 RSQLite_0.7-1
[7] DBI_0.2-4             AnnotationDbi_1.6.1   Biobase_2.4.1

loaded via a namespace (and not attached):
[1] annotate_1.22.0   genefilter_1.24.2 GSEABase_1.6.1    RBGL_1.20.0
[5] splines_2.9.0     survival_2.35-4   tools_2.9.0       XML_2.5-1
[9] xtable_1.5-5

Have you tried something as simple as restarting R?

Best,

Jim



Fraser Sim wrote:
> Here are the geneIds...
> 
>> paste("('", paste(as.numeric(geneIds), collapse = "','"), "')", sep = "")
> [1]
> "('5906','3433','51191','91543','6999','3434','8638','10561','3627','10964',
> '9636','54809','8339','8344','3437','2537','8346','85441','85236','64108','9
> 3082','11274','3013','5610','85439','10866','4061','8345','222171','10610','
> 55008','23586','10417','8343','51251','8519','3017','6890','129607','24138',
> '7776','51129','57568','55603','2048','10111','3431','152926','197135','8366
> 6','51513','4599','54739','167227','10486','8351','116071','54897','1471','7
> 903','6772','9881','4938','4600','147645','55337','8367','64135','157574','9
> 1351','4940','219285','87178','57714','6773','3456','4741','94240','55601','
> 54328','26047','9068','3620','4747','85352','26002','55384','6332','5359','8
> 5462','4343','84166','54625','8347','23767','3665','27324','8038','4856','57
> 674','84628','10673','4939')"
> 
> And this is how I generate my GeneIDUniverse
> 
>> GeneIDUniverse = unique(unlist(mget(featureNames(eset),
> hgu133plus2ENTREZID )))
>> GeneIDUniverse = GeneIDUniverse[!is.na(GeneIDUniverse)]
> 
> Thanks,
> Fraser
> 
> -----Original Message-----
> From: James W. MacDonald [mailto:jmacdon at med.umich.edu] 
> Sent: Monday, July 13, 2009 4:07 PM
> To: Fraser Sim
> Cc: bioconductor at stat.math.ethz.ch
> Subject: Re: [BioC] Error in summary(hyperGtest)
> 
> Hi Fraser,
> 
> Fraser Sim wrote:
>> I am using bioconductor to perform a hyperGtest on GO BP annotations. This
>> code has worked in the past but I am getting a strange error message from
>> the summary method of a hyperGtest-results object.
>>
>> Here's the code:
>>
>>> params = new("GOHyperGParams",
>> +    geneIds = as.numeric(geneIds),
>> +    universeGeneIds = as.numeric(GeneIDUniverse), annotation =
>> "hgu133plus2",
>> +    ontology = "BP", pvalueCutoff = 0.001, conditional = FALSE,
>> +    testDirection = "over")
>>> x <- hyperGTest(params)
>>> x
>> Gene to GO BP  test for over-representation 
>> 652 GO BP ids tested (22 have p < 0.001)
>> Selected gene set size: 74 
>>     Gene universe size: 11847 
>>     Annotation package: hgu133plus2
>>> summary(x)
>> Error in if (nrow(df) == 0) { : argument is of length zero
> 
> You shouldn't be seeing an error like that; it indicates that you aren't 
> getting anything at all returned (if df were a 0-rowed data.frame you 
> would just get a warning indicating that fact. The error you see 
> indicates that df was NULL).
> 
> An example that will replicate this would be nice. You could just give 
> the 74 EG IDs you used by
> 
> paste("('", paste(as.numeric(geneIds), collapse = "','"), "')", sep = "")
> 
> And cutting and pasting the output in an email. You could also give the 
> code you used to subset your GeneIDUniverse so we can recreate what you 
> have done.
> 
> Best,
> 
> Jim
> 
> 
>> Why does summary have this error when it looks like there are 22
> categories
>> which should be returned?
>>
>> Here's my sessionInfo()
>>
>> R version 2.9.1 (2009-06-26) 
>> i386-pc-mingw32 
>>
>> locale:
>> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>> States.1252;LC_MONETARY=English_United
>> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices datasets  utils     methods   base     
>>
>> other attached packages:
>>  [1] GOstats_2.10.0        graph_1.22.2          Category_2.10.1      
>>  [4] hgu133plus2.db_2.2.11 annaffy_1.16.0        KEGG.db_2.2.11       
>>  [7] GO.db_2.2.11          RSQLite_0.7-1         DBI_0.2-4            
>> [10] AnnotationDbi_1.6.1   limma_2.18.2          Biobase_2.4.1        
>>
>> loaded via a namespace (and not attached):
>> [1] annotate_1.22.0   genefilter_1.24.2 GSEABase_1.6.0    RBGL_1.20.0
> 
>> [5] splines_2.9.1     survival_2.35-4   tools_2.9.1       XML_2.3-0
> 
>> [9] xtable_1.5-5     
>>
>> Thanks,
>> Fraser
>>
>> _______________________________________________
>> 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
> 

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826



More information about the Bioconductor mailing list