Description Usage Arguments Details Value Author(s) Examples
The EnsDb
constructor function connects to the database
specified with argument x
and returns a corresponding
EnsDb
object.
1 | EnsDb(x)
|
x |
Either a character specifying the SQLite database file, or
a |
By providing the connection to a MySQL database, it is possible
to use MySQL as the database backend and queries will be performed on
that database. Note however that this requires the package RMySQL
to be installed. In addition, the user needs to have access to a MySQL
server providing already an EnsDb database, or must have write
privileges on a MySQL server, in which case the useMySQL
method can be used to insert the annotations from an EnsDB package into
a MySQL database.
A EnsDb
object.
Johannes Rainer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## "Standard" way to create an EnsDb object:
library(EnsDb.Hsapiens.v75)
EnsDb.Hsapiens.v75
## Alternatively, provide the full file name of a SQLite database file
dbfile <- system.file("extdata/EnsDb.Hsapiens.v75.sqlite", package = "EnsDb.Hsapiens.v75")
edb <- EnsDb(dbfile)
edb
## Third way: connect to a MySQL database
## Not run:
library(RMySQL)
dbcon <- dbConnect(MySQL(), user = my_user, pass = my_pass, host = my_host, dbname = "ensdb_hsapiens_v75")
edb <- EnsDb(dbcon)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.