Dear Marc and Hervé,
I believe the AnnotationForge package is currently not working correctly. Perhaps due to an update in SQL functions? To keep it as simple as possible, I simply tried to reproduce the worked example in Marc's "Making Organism packages" vignette. It required one small modification on the last line to run (type="source"), so I'll paste in the whole code here:
library(AnnotationForge)
## Makes an organism package for Zebra Finch data.frames:
finchFile <- system.file("extdata","finch_info.txt",
package="AnnotationForge")
finch <- read.table(finchFile,sep="\t")
## Now prepare some data.frames
fSym <- finch[,c(2,3,9)]
fSym <- fSym[fSym[,2]!="-",]
fSym <- fSym[fSym[,3]!="-",]
colnames(fSym) <- c("GID","SYMBOL","GENENAME")
fChr <- finch[,c(2,7)]
fChr <- fChr[fChr[,2]!="-",]
colnames(fChr) <- c("GID","CHROMOSOME")
finchGOFile <- system.file("extdata","GO_finch.txt",
package="AnnotationForge")
fGO <- read.table(finchGOFile,sep="\t")
fGO <- fGO[fGO[,2]!="",]
fGO <- fGO[fGO[,3]!="",]
colnames(fGO) <- c("GID","GO","EVIDENCE")
## Then call the function
makeOrgPackage(gene_info=fSym, chromosome=fChr, go=fGO,
version="0.1",
maintainer="Some One <so@someplace.org>",
author="Some One <so@someplace.org>",
outputDir = ".",
tax_id="59729",
genus="Taeniopygia",
species="guttata",
goTable="go")
## then you can call install.packages based on the return value
install.packages("./org.Tguttata.eg.db", repos=NULL, type="source")
No errors, but 50+ warnings like this:
In result_fetch(res@ptr, n = n) :
SQL statements must be issued with dbExecute() or dbSendStatement() instead of dbGetQuery() or dbSendQuery().
I can load the resulting package, but the database seems to be empty:
library("org.Tguttata.eg.db")
org.Tguttata.eg()
Quality control information for org.Tguttata.eg:
This package has the following mappings:
Additional Information about this package:
DB schema: NOSCHEMA_DB
DB schema version: 2.1
Organism: Taeniopygia guttata
At the end of this message, I'm posting my sessionInfo().
Many thanks for all the great work, and I hope this post helps getting others unstuck as well.
Cei
PS Thinking the RSQLite package might have been updated and become incompatible, I also tried running the same code on an old R (3.4) installation on Linux, but got similar warnings although mentioning different SQL functions, and the result was equally unpopulated.
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.4
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] org.Tguttata.eg.db_0.1 AnnotationForge_1.28.0 AnnotationDbi_1.48.0 IRanges_2.20.2 S4Vectors_0.24.4
[6] Biobase_2.46.0 BiocGenerics_0.32.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4 GO.db_3.10.0 XML_3.99-0.3 digest_0.6.25 bitops_1.0-6 DBI_1.1.0 RSQLite_2.2.0
[8] rlang_0.4.5 blob_1.2.1 vctrs_0.2.4 tools_3.6.2 bit64_0.9-7 RCurl_1.98-1.2 bit_1.1-15.2
[15] compiler_3.6.2 pkgconfig_2.0.3 memoise_1.1.0
I know it's less fun, but does
get you what you want?