I want to use the `AnnotationForge` package to create my own annotation package but I get an error with the example in the vignette (http://www.bioconductor.org/packages/release/bioc/vignettes/AnnotationForge/inst/doc/SQLForge.pdf) and I've spent the last 2 hours trying to resolve the error with no luck. Anyone have an idea to what the issue may be?
source("http://www.bioconductor.org/biocLite.R")
biocLite("AnnotationForge")
library(AnnotationForge)
hcg110_IDs = system.file("extdata",
"hcg110_ID",
package="AnnotationDbi")
tmpout = tempdir()
makeDBPackage("HUMANCHIP_DB",
affy=FALSE,
prefix="hcg110",
fileName=hcg110_IDs,
baseMapType="gb",
outputDir = tmpout,
version="1.0.0",
manufacturer = "Affymetrix",
chipName = "Human Cancer G110 Array",
manufacturerUrl = "http://www.affymetrix.com")
I get this error the first time I ran it:
`Error in sqliteSendQuery(con, statement, bind.data) : error in statement: no such table: src.accession`
Followed by this one:
`Error in sqliteSendQuery(con, statement, bind.data) : error in statement: table metadata already exists`
Appreciate any help in advance.
> sessionInfo()
R version 3.1.2 (2014-10-31) Platform: i686-pc-linux-gnu (32-bit) 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] AnnotationForge_1.8.2 org.Hs.eg.db_3.0.0 RSQLite_1.0.0 DBI_0.3.1 AnnotationDbi_1.28.1 GenomeInfoDb_1.2.4 [7] IRanges_2.0.1 S4Vectors_0.4.0 Biobase_2.26.0 BiocGenerics_0.12.1 BiocInstaller_1.16.1 loaded via a namespace (and not attached): [1] tools_3.1.2

Hello James. My goal is to create my own annotation package (using the SQLForge.pdf) for a specific chip, which I successfully did last year. However, when I try to rerun the code, I get the stated errors. I used the example from the vignette as a template for my package so I'm trying to troubleshoot what the issue is.
As Dan mentions below, you shouldn't be seeing sqliteSendQuery() any more. And I can run your code without problems:
> makeDBPackage("HUMANCHIP_DB", + affy=FALSE, + prefix="hcg110", + fileName=hcg110_IDs, + baseMapType="gb", + outputDir = tmpout, + version="1.0.0", + manufacturer = "Affymetrix", + chipName = "Human Cancer G110 Array", + manufacturerUrl = "http://www.affymetrix.com") baseMapType is gb or gbNRef Prepending Metadata Creating Genes table Appending Probes Found 2059 Probe Accessions Appending Gene Info Found 1435 Gene Names Found 1435 Gene Symbols Appending Chromosomes Appending Cytogenetic Locations Appending Omim Appending RefSeq Appending Pubmed Appending Unigene Appending ChrLengths Appending 3 GO tables Appending 3 GO ALL tables Appending KEGG Appending EC Appending Chromosome Locations Appending Pfam Appending Prosite Appending Alias Appending Ensembl Appending Uniprot Appending Metadata simplifying probes table dropping redundant data Creating package in ./hcg110.db Warning messages: 1: 'dbBeginTransaction' is deprecated. Use 'dbBegin' instead. See help("Deprecated") 2: 'dbBeginTransaction' is deprecated. Use 'dbBegin' instead. See help("Deprecated") > sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-unknown-linux-gnu (64-bit) 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] AnnotationForge_1.8.2 org.Hs.eg.db_3.0.0 RSQLite_1.0.0 [4] DBI_0.3.1 AnnotationDbi_1.28.1 GenomeInfoDb_1.2.4 [7] IRanges_2.0.1 S4Vectors_0.4.0 Biobase_2.26.0 [10] BiocGenerics_0.12.1So you can try running traceback() after the error.
An update. As Dan mentions, sqliteSendQuery has been scrubbed from AnnotationForge, but not RSQLite:
> getAnywhere(sqliteSendQuery) A single object matching ‘sqliteSendQuery’ was found It was found in the following places namespace:RSQLite with value function (con, statement, bind.data = NULL) { if (!is.null(bind.data)) { if (!is.data.frame(bind.data)) { bind.data <- as.data.frame(bind.data) } if (nrow(bind.data) == 0 || ncol(bind.data) == 0) { stop("bind.data must have non-zero dimensions") } } rsId <- .Call(rsqlite_query_send, con@Id, as.character(statement), bind.data) new("SQLiteResult", Id = rsId) } <environment: namespace:RSQLite>In addition, the second error you see above is because you already have a partially built package in your tmpdir.
> dir(".", "hcg") [1] "hcg110.db" "hcg110.sqlite" > makeDBPackage("HUMANCHIP_DB", + affy=FALSE, + prefix="hcg110", + fileName=hcg110_IDs, + baseMapType="gb", + outputDir = tmpout, + version="1.0.0", + manufacturer = "Affymetrix", + chipName = "Human Cancer G110 Array", + manufacturerUrl = "http://www.affymetrix.com") Error in sqliteSendQuery(con, statement, bind.data) : error in statement: table metadata already existsAnd the fix is to remove those files:
> unlink(dir(".", "hcg"), recursive = TRUE) > makeDBPackage("HUMANCHIP_DB", + affy=FALSE, + prefix="hcg110", + fileName=hcg110_IDs, + baseMapType="gb", + outputDir = tmpout, + version="1.0.0", + manufacturer = "Affymetrix", + chipName = "Human Cancer G110 Array", + manufacturerUrl = "http://www.affymetrix.com") baseMapType is gb or gbNRef Prepending Metadata Creating Genes table Appending Probes Found 2059 Probe Accessions Appending Gene Info Found 1435 Gene Names Found 1435 Gene Symbols Appending Chromosomes Appending Cytogenetic Locations Appending Omim Appending RefSeq Appending Pubmed Appending Unigene Appending ChrLengths Appending 3 GO tables Appending 3 GO ALL tables Appending KEGG Appending EC Appending Chromosome Locations Appending Pfam Appending Prosite Appending Alias Appending Ensembl Appending Uniprot Appending Metadata simplifying probes table dropping redundant data Creating package in ./hcg110.db Warning messages: 1: 'dbBeginTransaction' is deprecated. Use 'dbBegin' instead. See help("Deprecated") 2: 'dbBeginTransaction' is deprecated. Use 'dbBegin' instead. See help("Deprecated")Yes, I misspoke. The change is that sqliteSendQuery is no longer exported from RSQLite.
Appreciate the walkthrough. Thanks, James.
So James's fix did not work for you?