Bioconductor / AnnotationForge

Tools for building SQLite-based annotation data packages
https://bioconductor.org/packages/AnnotationForge
4 stars 9 forks source link

Database created by makeOrgPackage() "not available for R 3.6.3" #10

Closed niahughes closed 4 years ago

niahughes commented 4 years ago

Hello there,

I'm having trouble putting together a custom OrgDB for both my organism of interest (maize) and the test from the vignette. I won't include the complete code, as running what's available in the vignette gives me the same errors as my own custom code, namely:

> install.packages("./org.Tguttata.eg.db")
Installing package into ‘C:/Users/Nia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘./org.Tguttata.eg.db’ is not available (for R version 3.6.3)
> install.packages("./org.Tguttata.eg.db", repos=NULL)
Installing package into ‘C:/Users/Nia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Error in install.packages : type == "both" cannot be used with 'repos = NULL'

Upon running through the makeOrgPackage() step, it all appears to be working:

Populating genes table:
genes table filled
Populating gene_info table:
gene_info table filled
Populating chromosome table:
chromosome table filled
Populating go table:
go table filled
table metadata filled
'select()' returned many:1 mapping between keys and columns
Dropping GO IDs that are too new for the current GO.db
Populating go table:
go table filled
Populating go_bp table:
go_bp table filled
Populating go_cc table:
go_cc table filled
Populating go_mf table:
go_mf table filled
'select()' returned many:1 mapping between keys and columns
Populating go_bp_all table:
go_bp_all table filled
Populating go_cc_all table:
go_cc_all table filled
Populating go_mf_all table:
go_mf_all table filled
Populating go_all table:
go_all table filled
Creating package in ./org.Tguttata.eg.db 
Now deleting temporary database file
[1] "./org.Tguttata.eg.db"
There were 50 or more warnings (use warnings() to see the first 50)

The warnings are mostly just the following:

> warnings()
Warning messages:
1: In result_fetch(res@ptr, n = n) :
  SQL statements must be issued with dbExecute() or dbSendStatement() instead of dbGetQuery() or dbSendQuery().

However, when I run it without the goTable argument, I get fewer warnings and the last indicates that the .sqlite file can't be removed. I also can't remove it through the RStudio GUI until RStudio is closed.

> warnings()
Warning messages:
1: In result_fetch(res@ptr, n = n) :
  SQL statements must be issued with dbExecute() or dbSendStatement() instead of dbGetQuery() or dbSendQuery().
[...]
25: In result_fetch(res@ptr, n = n) :
  SQL statements must be issued with dbExecute() or dbSendStatement() instead of dbGetQuery() or dbSendQuery().
26: In file.remove(dbFileName) :
  cannot remove file './org.Tguttata.eg.sqlite', reason 'Permission denied'

And here's my session info.

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
 [1] AnnotationForge_1.28.0 topGO_2.38.1           SparseM_1.78           GO.db_3.10.0           AnnotationDbi_1.48.0   IRanges_2.20.2        
 [7] S4Vectors_0.24.3       Biobase_2.46.0         graph_1.64.0           BiocGenerics_0.32.0   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4         bit_1.1-15.2       lattice_0.20-40    rlang_0.4.5        blob_1.2.1         tools_3.6.3        grid_3.6.3        
 [8] DBI_1.1.0          matrixStats_0.56.0 bit64_0.9-7        digest_0.6.25      bitops_1.0-6       vctrs_0.2.4        RCurl_1.98-1.1    
[15] memoise_1.1.0      RSQLite_2.2.0      compiler_3.6.3     XML_3.99-0.3       pkgconfig_2.0.3   

Thanks! Nia

mtmorgan commented 4 years ago

To install the package try install.packages("org.Tguttata.eg.db", repo = NULL, type = "source") I'm not sure about the other troubleshooting question and you may have more luck asking on https://support.bioconductor.org.

niahughes commented 4 years ago

Thanks - that cleared it right up (other than the connection failing to close, but that's no big deal).