R: Saving and loading 'refGenome' objects to and from SQLite...

writeDB {refGenome} | R Documentation

## 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)

### Author(s)

Wolfgang Kaisers

### Examples

    ##-------------------------------------##
    ## Not executed because RSQlite
    ## seems to produce memory leaks
    ##-------------------------------------##
    # A) Ensembl genome:

    ensfile <- system.file("extdata",
                            "hs.ensembl.62.small.RData", package="refGenome")
    ens <- loadGenome(ensfile)
    writeDB(ens, "ens.db3", useBasedir=FALSE)
    ens <- loadGenomeDb("ens.db3")

    ##-------------------------------------##

    ucfile <- system.file("extdata", "hs.ucsc.small.RData", package="refGenome")
    uc <- loadGenome(ucfile)
    writeDB(uc,"uc.db3",useBasedir=FALSE)
    uc <- loadGenomeDb("uc.db3")

    ##-------------------------------------##

[Package refGenome version 1.7.7 Index]