Learn R Programming

valr (version 0.5.0)

db: Fetch data from remote databases.

Description

Currently db_ucsc and db_ensembl are available for connections.

Usage

db_ucsc(dbname, host = "genome-mysql.cse.ucsc.edu", user = "genomep",
  password = "password", port = 3306, ...)

db_ensembl(dbname, host = "ensembldb.ensembl.org", user = "anonymous", password = "", port = 3306, ...)

Arguments

dbname

name of database

host

hostname

user

username

password

password

port

MySQL connection port

...

params for connection

See Also

https://genome.ucsc.edu/goldenpath/help/mysql.html

http://www.ensembl.org/info/data/mysql.html

Examples

Run this code
# NOT RUN {
if(require(RMySQL)) {
  ucsc <- db_ucsc('hg38')

  # fetch the `refGene` tbl
  tbl(ucsc, "refGene")

  # the `chromInfo` tbls have size information
  tbl(ucsc, "chromInfo")
}
# }
# NOT RUN {
# }
# NOT RUN {
if(require(RMySQL)) {
  # squirrel genome
  ensembl <- db_ensembl('spermophilus_tridecemlineatus_core_67_2')

  tbl(ensembl, "gene")
}
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab