multicore package and AnnotationDbi
1
0
Entering edit mode
@stephenruddorionpharmacom-3965
Last seen 9.6 years ago
Dear BioC list, I am trying to optimize the performance of some data reporting tools and am struggling to deploy multi-threaded enrichment analysis methods. If I attempt to use the multicore::mclapply method with functions that utilize the AnnotationDbi package I am met with an error "Error in sqliteExecStatement(con, statement, bind.data) : \n RS-DBI driver: (invalid dbManager handle)\n" There has been brief mention of this in the past that "the child processes that are forked by the mclapply function are not able to use the database connection that they inherited from their parent." - are there any solutions as to how this might be worked around? I'm using a rather vanilla R installation R version 2.10.1 (2009-12-14) x86_64-unknown-linux-gnu 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=C 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] stats graphics grDevices utils datasets methods base other attached packages: [1] limma_3.2.1 XML_2.6-0 rat2302.db_2.3.5 [4] org.Rn.eg.db_2.3.5 affy_1.24.2 multicore_0.1-3 [7] GO.db_2.3.5 GOstats_2.12.0 RSQLite_0.8-2 [10] DBI_0.2-5 graph_1.24.2 Category_2.12.0 [13] AnnotationDbi_1.8.1 Biobase_2.6.1 OrionR_0.4.211 loaded via a namespace (and not attached): [1] affyio_1.14.0 annotate_1.24.1 genefilter_1.28.2 [4] GSEABase_1.8.0 preprocessCore_1.8.0 RBGL_1.22.0 [7] splines_2.10.1 survival_2.35-8 tools_2.10.1 [10] xtable_1.5-6 Thanks - greetings from Finland Stephen [[alternative HTML version deleted]]
GO rat2302 AnnotationDbi GO rat2302 AnnotationDbi • 900 views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 6 weeks ago
United States
You aren't supplying many details, but there is a principle that should help you get around this problem. I can reproduce your error message with the following: library(org.Hs.eg.db) library(multicore) g = function(x) get("1", org.Hs.egSYMBOL) mclapply(1:3, g) on the other hand, if, in a fresh session, i define f = function(x) {library(org.Hs.eg.db); get("1", org.Hs.egSYMBOL)} library(multicore) mclapply(1:3, f) all is well. the principle is to fork before building the connections. there may be other solutions. On Wed, Mar 17, 2010 at 4:48 AM, <stephen.rudd at="" orionpharma.com=""> wrote: > Dear BioC list, > > I am trying to optimize the performance of some data reporting tools and am struggling to deploy multi-threaded enrichment analysis methods. If I attempt to use the multicore::mclapply method ?with functions that utilize the AnnotationDbi package I am met with an error > > "Error in sqliteExecStatement(con, statement, bind.data) : \n ?RS- DBI driver: (invalid dbManager handle)\n" > > There has been brief mention of this in the past that "the child processes that are forked by the mclapply function are not able to use the database connection that they inherited from their parent." - are there any solutions as to how this might be worked around? > > I'm using a rather vanilla R installation > > R version 2.10.1 (2009-12-14) > x86_64-unknown-linux-gnu > > 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=C ? ? ? ? ? ? ?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] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base > > other attached packages: > ?[1] limma_3.2.1 ? ? ? ? XML_2.6-0 ? ? ? ? ? rat2302.db_2.3.5 > ?[4] org.Rn.eg.db_2.3.5 ?affy_1.24.2 ? ? ? ? multicore_0.1-3 > ?[7] GO.db_2.3.5 ? ? ? ? GOstats_2.12.0 ? ? ?RSQLite_0.8-2 > [10] DBI_0.2-5 ? ? ? ? ? graph_1.24.2 ? ? ? ?Category_2.12.0 > [13] AnnotationDbi_1.8.1 Biobase_2.6.1 ? ? ? OrionR_0.4.211 > > loaded via a namespace (and not attached): > ?[1] affyio_1.14.0 ? ? ? ?annotate_1.24.1 ? ? ?genefilter_1.28.2 > ?[4] GSEABase_1.8.0 ? ? ? preprocessCore_1.8.0 RBGL_1.22.0 > ?[7] splines_2.10.1 ? ? ? survival_2.35-8 ? ? ?tools_2.10.1 > [10] xtable_1.5-6 > > Thanks - greetings from Finland > > Stephen > > ? ? ? ?[[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT

Login before adding your answer.

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