Learn R Programming

refGenome (version 1.7.7)

writeDB: Saving and loading refGenome objects to and from SQLite databases.

Description

refGenome objects keep annotation data in data.frames. The content of the data.frames is written to or extracted from a SQLite database.

Usage

writeDB(object,filename,useBasedir=TRUE,...)

Arguments

object

refGenome (or derived)

filename

Character. Filename of the R-data-file wich is written.

useBasedir

Logical. When TRUE the database will be created in basedir. Otherwise the database will be created in the current working directory or elsewhere (when path is included in filename).

...

(unused)

Examples

Run this code
# NOT RUN {
##-------------------------------------##
## Not executed because RSQlite
## seems to produce memory leaks
##-------------------------------------##
# A) Ensembl genome:
# }
# NOT RUN {
ensfile <- system.file("extdata",
                        "hs.ensembl.62.small.RData", package="refGenome")
ens <- loadGenome(ensfile)
writeDB(ens, "ens.db3", useBasedir=FALSE)
ens <- loadGenomeDb("ens.db3")
# }
# NOT RUN {
##-------------------------------------##
# }
# NOT RUN {
ucfile <- system.file("extdata", "hs.ucsc.small.RData", package="refGenome")
uc <- loadGenome(ucfile)
writeDB(uc,"uc.db3",useBasedir=FALSE)
uc <- loadGenomeDb("uc.db3")
# }
# NOT RUN {
##-------------------------------------##
# }

Run the code above in your browser using DataLab