problem with AnnotationDbi
1
0
Entering edit mode
Mark W Kimpel ▴ 830
@mark-w-kimpel-2027
Last seen 7.1 years ago
The code below, which produces the error message and sessionInfo which follow, was working last week but now is not. I got into this because I am having trouble with the Category package and wanted to rebuild my build of ragene10stv1.db package that Category was depending on. This build, which had gone uneventfully last week, produced the error below. I moved both the rat.db0 and ragene10stv1.db packages outside of my site-library directory and reinstalled rat.db using biocLite, thinking that perhaps I wasn't supposed to be installing an AnnotationDbi package on top of an identical one. This didn't help so I provide below a truncated, example, which does require prior installation of AnnotationDbi and rat.db0. Mark test.vec <- c(10701630,10701632,10701636,10701643,10701648,10701654,10 701663,10701666,10701668,10701671,10701674,10701679,10701684,10701689, 10701691,10701697,10701699,10701709,10701714,10701717,NA,NA,292438,502 213,679691,308257,292449,NA,678740,678740,679691,292450,679825,NA,NA,N A,292462,308265,NA,292464) output.mat <- matrix(test.vec, ncol = 2) write.table(output.mat, "RaGene-1_0-st-v1.eg.csv", col.names = FALSE, row.names = FALSE, sep = "\t") require(AnnotationDbi) makeRATCHIP_DB(affy = FALSE, prefix = "ragene10stv1", fileName = "RaGene-1_0-st-v1.eg.csv", otherSrc = character(0), chipMapSrc = system.file("extdata","chipmapsrc_rat.sqlite", package = "rat.db0"), chipSrc = system.file("extdata","chipsrc_rat.sqlite", package = "rat.db0"), baseMapType = "eg", outputDir = .libPaths()[1], version = "1.0.0", manufacturer = "Affymetrix", chipName = "ragene10stv1", manufacturerUrl = "http://www.affymetrix.com", author = "Mark Kimpel", maintainer = "Mark Kimpel <mkimpel at="" iupui.edu="">") # > makeRATCHIP_DB(affy = FALSE, + prefix = "ragene10stv1", + fileName = "RaGene-1_0-st-v1.eg.csv", + otherSrc = character(0), + chipMapSrc = system.file("extdata","chipmapsrc_rat.sqlite", package = "rat.db0"), + chipSrc = system.file("extdata","chipsrc_rat.sqlite", package = "rat.db0"), + baseMapType = "eg", + outputDir = .libPaths()[1], + version = "1.0.0", + manufacturer = "Affymetrix", + chipName = "ragene10stv1", + manufacturerUrl = "http://www.affymetrix.com", + author = "Mark Kimpel", + maintainer = "Mark Kimpel <mkimpel at="" iupui.edu="">") Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: table metadata already exists) Enter a frame number, or 0 to exit 1: makeRATCHIP_DB(affy = FALSE, prefix = "ragene10stv1", fileName = "RaGene-1_ 2: popRATCHIPDB(affy = affy, prefix = prefix, fileName = fileName, chipMapSrc 3: getMapForOtherChipPkg(filePath = fileName, pkgName = prefix, chipMapSrc = c 4: probe2gene(baseMap = baseMap, baseMapType = baseMapType, otherSrc = otherSr 5: sqliteQuickSQL(db, "CREATE TABLE metadata (name VARCHAR(80) PRIMARY KEY, va 6: sqliteExecStatement(con, statement, bind.data) Selection: c Enter an item from the menu, or 0 to exit Selection: 0 > sessionInfo() R version 2.8.0 (2008-10-20) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US .UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_N AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTI FICATION=C attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base other attached packages: [1] RSQLite_0.7-0 DBI_0.2-4 AnnotationDbi_1.4.0 [4] affy_1.20.0 Biobase_2.2.0 graph_1.20.0 loaded via a namespace (and not attached): [1] affyio_1.10.0 cluster_1.11.11 preprocessCore_1.4.0 > ------------------------------------------------------------ Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, & Mobile & VoiceMail (317) 399-1219 Home Skype: mkimpel "The real problem is not whether machines think but whether men do." -- B. F. Skinner
ChipName db0 affy Category AnnotationDbi ChipName db0 affy Category AnnotationDbi • 790 views
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 23 hours ago
Seattle, WA, United States
Hi Mark, Quoting Mark Kimpel <mwkimpel at="" gmail.com="">: [...] > Error in sqliteExecStatement(con, statement, bind.data) : > RS-DBI driver: (error in statement: table metadata already exists) I guess the code you are running has been designed to generate an .sqlite file from scratch. So it probably assumes that you don't already have this file on disk. What happens is that, if this file doesn't exist, then dbConnect() (which is called internally by makeRATCHIP_DB()) will create it, otherwise it will open the existing one. If the existing file already contains the 'metadata' table (or any other table that makeRATCHIP_DB() needs to create) then you'll get an error like the one you got. In your case it looks like you already have an old .sqlite file that probably results from a previous attempt to run makeRATCHIP_DB(). Make sure you remove it (you'll need to figure out where it is) before you run makeRATCHIP_DB() again. Cheers, H. > > Enter a frame number, or 0 to exit > > 1: makeRATCHIP_DB(affy = FALSE, prefix = "ragene10stv1", fileName = > "RaGene-1_ > 2: popRATCHIPDB(affy = affy, prefix = prefix, fileName = fileName, chipMapSrc > 3: getMapForOtherChipPkg(filePath = fileName, pkgName = prefix, > chipMapSrc = c > 4: probe2gene(baseMap = baseMap, baseMapType = baseMapType, otherSrc > = otherSr > 5: sqliteQuickSQL(db, "CREATE TABLE metadata (name VARCHAR(80) > PRIMARY KEY, va > 6: sqliteExecStatement(con, statement, bind.data) > > Selection: c > Enter an item from the menu, or 0 to exit > Selection: 0 >> sessionInfo() > R version 2.8.0 (2008-10-20) > x86_64-unknown-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_ US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC _NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDEN TIFICATION=C > > attached base packages: > [1] tools stats graphics grDevices utils datasets methods > [8] base > > other attached packages: > [1] RSQLite_0.7-0 DBI_0.2-4 AnnotationDbi_1.4.0 > [4] affy_1.20.0 Biobase_2.2.0 graph_1.20.0 > > loaded via a namespace (and not attached): > [1] affyio_1.10.0 cluster_1.11.11 preprocessCore_1.4.0 >> > ------------------------------------------------------------ > Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry > Indiana University School of Medicine > > 15032 Hunter Court, Westfield, IN 46074 > > (317) 490-5129 Work, & Mobile & VoiceMail > (317) 399-1219 Home > Skype: mkimpel > > "The real problem is not whether machines think but whether men do." > -- B. F. Skinner > > _______________________________________________ > 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: 306 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