sqliteSendQuery in AnnotationDbi
1
0
Entering edit mode
@jessicahekman-6877
Last seen 9.3 years ago
United States

HI all. I am trying to run derfinder, but am running into a problem with its calls to AnnotationDbi. I seem to have isolated the problem like so:

> library ("AnnotationDbi")
> load("dogTxEnsembl.Rda")
> class(dogTx)
[1] "GenomicFeatures"
> organism(dogTx)

Error in sqliteSendQuery(con, statement, bind.data) :
expired SQLiteConnection

I wonder if something is out of date with something else but I've been beating my head against it for a few hours and can't figure out what. Help?

Session info -------------------------------------------------------------------
 setting  value                       
 version  R version 3.2.0 (2015-04-16)
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/Chicago             

Packages -----------------------------------------------------------------------
 package           * version  date       source        
 AnnotationDbi     * 1.30.1   2015-06-07 Bioconductor  
 Biobase           * 2.28.0   2015-05-14 Bioconductor  
 BiocGenerics      * 0.14.0   2015-05-14 Bioconductor  
 BiocParallel        1.2.2    2015-06-07 Bioconductor  
 biomaRt             2.24.0   2015-05-14 Bioconductor  
 Biostrings          2.36.1   2015-05-14 Bioconductor  
 bitops              1.0-6    2013-08-17 CRAN (R 3.0.2)
 curl                0.8      2015-06-06 CRAN (R 3.2.0)
 DBI                 0.3.1    2014-09-24 CRAN (R 3.1.1)
 devtools            1.8.0    2015-05-09 CRAN (R 3.2.0)
 digest              0.6.8    2014-12-31 CRAN (R 3.1.1)
 futile.logger       1.4.1    2015-04-20 CRAN (R 3.2.0)
 futile.options      1.0.0    2010-04-06 CRAN (R 3.2.0)
 GenomeInfoDb      * 1.4.0    2015-05-14 Bioconductor  
 GenomicAlignments   1.4.1    2015-05-14 Bioconductor  
 GenomicFeatures     1.20.1   2015-05-14 Bioconductor  
 GenomicRanges       1.20.4   2015-06-07 Bioconductor  
 git2r               0.10.1   2015-05-07 CRAN (R 3.2.0)
 IRanges           * 2.2.3    2015-06-07 Bioconductor  
 lambda.r            1.1.7    2015-03-20 CRAN (R 3.2.0)
 memoise             0.2.1    2014-04-22 CRAN (R 3.1.1)
 Rcpp                0.11.6   2015-05-01 CRAN (R 3.1.3)
 RCurl               1.95-4.6 2015-04-24 CRAN (R 3.1.3)
 Rsamtools           1.20.4   2015-06-07 Bioconductor  
 RSQLite             1.0.0    2014-10-25 CRAN (R 3.2.0)
 rtracklayer         1.28.4   2015-06-07 Bioconductor  
 rversions           1.0.1    2015-06-06 CRAN (R 3.2.0)
 S4Vectors         * 0.6.0    2015-05-14 Bioconductor  
 XML                 3.98-1.2 2015-05-31 CRAN (R 3.2.0)
 xml2                0.1.1    2015-06-02 CRAN (R 3.2.0)
 XVector             0.8.0    2015-05-14 Bioconductor  
 zlibbioc            1.14.0   2015-05-14 Bioconductor 
annotationdbi • 2.2k views
ADD COMMENT
0
Entering edit mode

What is dogTxEnsembl.rda? Where did you get it?

ADD REPLY
0
Entering edit mode

Sorry -- dogTxEnsembl.rda contains dogTx which was built like so:

dogTx <- makeTranscriptDbFromBiomart(biomart="ensembl",
                                 dataset="cfamiliaris_gene_ensembl",
                                 transcript_ids=NULL,
                                 circ_seqs=DEFAULT_CIRC_SEQS,
                                 filters="",
                                 id_prefix="ensembl_",
                                 host="www.biomart.org",
                                 port=80,
                                 miRBaseBuild=NA)

 

ADD REPLY
1
Entering edit mode

This has to do with saving/loading a TxDb object. You are probably better off creating a package and installing it, but I have asked about how one might save and re-load a TxDb object Saving/loading TxDb objects.

ADD REPLY
0
Entering edit mode

It's an interesting trade-off between creating a package or a stand-alone db (with AnnotationDbi saveDb() / loadDb()). The package solution seems like it's useful if you're going to share with others; it also provides a built-in versioning and file management solution (you'll install it in R's library directory). On the other hand the saved database is just a single file, is self-documenting, and is more transparently 'just a data base' for access via other means.

ADD REPLY
0
Entering edit mode

Thanks James!

Martin: yeah, I do intend to create a dog transcripts package at some point, but first I just wanted to make sure everything worked as expected. (I will also admit that I'm nervous about sharing a package with others as I'm still pretty new to Bioconductor, but I suppose I need to suck it up and just do it.)

ADD REPLY
0
Entering edit mode
@jessicahekman-6877
Last seen 9.3 years ago
United States

The solution was:

library("AnnotationDbi")
library("biomaRt")
library("GenomicFeatures")
dogTxDb <- makeTxDbFromBiomart(biomart="ensembl",
                               dataset="cfamiliaris_gene_ensembl",
                               transcript_ids=NULL,
                               circ_seqs=DEFAULT_CIRC_SEQS,
                               filters="",
                               id_prefix="ensembl_",
                               host="www.biomart.org",
                               port=80,
                               miRBaseBuild=NA)

# TODO: makeTxDbPackageFromBiomart -- seems easy, once this all works and I'm ready to submit it

saveDb(dogTxDb, "CanisFamiliarisTxDb-20150609.Rda")

# exit, restart R

library(AnnotationDbi)
dogTxDb <- loadDb("CanisFamiliarisTxDb-20150609.Rda")
organism(dogTxDb)

Thank you James and Martin!

ADD COMMENT
0
Entering edit mode

Hi Jessica,

It might sound like a minor cosmetic detail but I would suggest that you use the .sqlite extension instead of .rda when you save the db to a file. This is because saveDb()/loadDb() don't "serialize" the TxDb object in the usual .rda format used by save()/load() but instead dump the content of the db to an SQLite file. By using the .sqlite extension, there is less risk that you get confused later on when you find this file on your hard drive and try to remember what it is and how to load it in R. Also the .sqlite extension will nicely get along with any of the existing non-BioC tools for accessing SQLite files (e.g. the sqlite3 standalone command), just in case you or one of your collaborators want to access the file that way.

H.

ADD REPLY
0
Entering edit mode

Ah, thank you! Yes, I'll go change that now.

ADD REPLY

Login before adding your answer.

Traffic: 851 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