File: MySQL-backend.R

package info (click to toggle)
r-bioc-ensembldb 2.6.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,720 kB
  • sloc: perl: 326; makefile: 5
file content (35 lines) | stat: -rw-r--r-- 1,216 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## ----eval = FALSE----------------------------------------------------------
#  library(ensembldb)
#  ## Load the EnsDb package that should be installed on the MySQL server
#  library(EnsDb.Hsapiens.v86)
#  
#  ## Call the useMySQL method providing the required credentials to create
#  ## databases and inserting data on the MySQL server
#  edb_mysql <- useMySQL(EnsDb.Hsapiens.v86, host = "localhost",
#                        user = "userwrite", pass = "userpass")
#  
#  ## Use this EnsDb object
#  genes(edb_mysql)
#  

## ----eval = FALSE----------------------------------------------------------
#  library(ensembldb)
#  library(RMariaDB)
#  
#  ## Connect to the MySQL database to list the databases.
#  dbcon <- dbConnect(MariaDB(), host = "localhost", user = "readonly",
#                     pass = "readonly")
#  
#  ## List the available databases
#  listEnsDbs(dbcon)
#  
#  ## Connect to one of the databases and use that one.
#  dbcon <- dbConnect(MariaDB(), host = "localhost", user = "readonly",
#                     pass = "readonly", dbname = "ensdb_hsapiens_v75")
#  edb <- EnsDb(dbcon)
#  edb
#  

## ----sessionInfo-----------------------------------------------------------
sessionInfo()