topGO "argument is of length zero" error
1
0
Entering edit mode
fklirono • 0
@user-24030
Last seen 3.5 years ago

This error seems to be coming back and going away. It has been reported before.

Code to reproduce it comes out of the vignette:

library(topGO)
library(ALL)
data(ALL)
data(geneList)
affyLib <- paste(annotation(ALL), "db", sep = ".")
library(package = affyLib, character.only = TRUE)
sampleGOdata <- new("topGOdata", description = "Simple session", 
    ontology = "BP", allGenes = geneList, geneSel = topDiffGenes, 
    nodeSize = 10, annot = annFUN.db, affyLib = affyLib)
Building most specific GOs .....
    ( 1670 GO terms found. )

Build GO DAG topology ..........
Error in if (node == GENE.ONTO.ROOT) return(2) : 
  argument is of length zero

Any ideas how to fix this quickly?

R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.7 LTS

Matrix products: default
BLAS:   /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale:
 [1] 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   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] hgu95av2.db_3.2.3    org.Hs.eg.db_3.12.0  ALL_1.31.0           topGO_2.41.0         SparseM_1.78         GO.db_3.12.0        
 [7] AnnotationDbi_1.52.0 IRanges_2.24.0       S4Vectors_0.28.0     Biobase_2.50.0       graph_1.68.0         BiocGenerics_0.36.0 
[13] colorout_1.2-2       rmarkdown_2.5       

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5         knitr_1.30         bit_4.0.4          lattice_0.20-41    rlang_0.4.8        blob_1.2.1         tools_4.0.3       
 [8] grid_4.0.3         xfun_0.18          DBI_1.1.0          matrixStats_0.57.0 htmltools_0.5.0    bit64_4.0.5        digest_0.6.27     
[15] vctrs_0.3.4        memoise_1.1.0      evaluate_0.14      RSQLite_2.2.1      compiler_4.0.3     pkgconfig_2.0.3
GO.db topGO • 1.1k views
ADD COMMENT
0
Entering edit mode

ok, answering this myself. If I downgrade GO.db to version 3.11.4 the error goes away.

ADD REPLY
0
Entering edit mode

Hi,

I'm having the same problem in R. How did you downgrade the GO.db package?

Thanks

ADD REPLY
0
Entering edit mode
library(BiocManager)
BiocManager::install("GO.db")

It's been fixed, as I noted in the answer to the OP's question.

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 9 hours ago
United States

This is an error in the GO.db package. Unfortunately we have had to change the way we parse the data from the geneontology group, and it hasn't gone as smoothly as one might have liked. Anyway...

> library(ALL)
> data(ALL)
> data(geneList)
> affyLib <- paste(annotation(ALL), "db", sep = ".")
> library(package = affyLib, character.only = TRUE)

 > sampleGOdata <- new("topGOdata", description = "Simple session",
 +     ontology = "BP", allGenes = geneList, geneSel = topDiffGenes,
 +     nodeSize = 10, annot = annFUN.db, affyLib = affyLib)
 >

 Building most specific GOs .....
         ( 1670 GO terms found. )

 Build GO DAG topology ..........
         ( 4496 GO terms and 10302 relations. )

 Annotating nodes ...............
         ( 310 genes annotated to the GO terms. )
 Warning message:
 In result_fetch(res@ptr, n = n) :
   SQL statements must be issued with dbExecute() or dbSendStatement() instead of dbGetQuery() or dbSendQuery().
 > sampleGOdata

 ------------------------- topGOdata object -------------------------

  Description:
    -  Simple session

  Ontology:
    -  BP

  323 available genes (all genes from the array):
    - symbol:  1095_s_at 1130_at 1196_at 1329_s_at 1340_s_at  ...
    - score :  1 1 0.62238 0.541224 1  ...
    - 50  significant genes.

  310 feasible genes (genes that can be used in the analysis):
    - symbol:  1095_s_at 1130_at 1196_at 1329_s_at 1340_s_at  ...
    - score :  1 1 0.62238 0.541224 1  ...
    - 46  significant genes.

  GO graph (nodes with at least  10  genes):
    - a graph with directed edges
    - number of nodes = 1093
    - number of edges = 2368

 ------------------------- topGOdata object -------------------------

> sessionInfo()
 R version 4.0.2 (2020-06-22)
 Platform: x86_64-pc-linux-gnu (64-bit)
 Running under: CentOS Linux 7 (Core)

 Matrix products: default
 BLAS/LAPACK: /share/apps/MKL/mkl-2019.3/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64_lin/libmkl_gf_lp64.so

 locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

 other attached packages:
  [1] hgu95av2.db_3.2.3    org.Hs.eg.db_3.12.0  ALL_1.32.0
  [4] BiocManager_1.30.10  topGO_2.41.0         SparseM_1.78
  [7] GO.db_3.12.1         AnnotationDbi_1.52.0 IRanges_2.24.0
 [10] S4Vectors_0.28.0     Biobase_2.50.0       graph_1.68.0
 [13] BiocGenerics_0.36.0

 loaded via a namespace (and not attached):
  [1] Rcpp_1.0.5         bit_4.0.4          lattice_0.20-41    rlang_0.4.8
  [5] blob_1.2.1         tools_4.0.2        grid_4.0.2         DBI_1.1.0
  [9] matrixStats_0.57.0 bit64_4.0.5        digest_0.6.27      vctrs_0.3.4
 [13] memoise_1.1.0      RSQLite_2.2.1      compiler_4.0.2     pkgconfig_2.0.3

The new version of GO.db (3.12.1) should become available within the next few days.

ADD COMMENT

Login before adding your answer.

Traffic: 720 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6