annovarR (version 1.0.0)

mysql.auto.build: Build annovarR database in mysql (auto from extdata/config/database.toml)

Description

Build annovarR database in mysql (auto from extdata/config/database.toml)

Usage

mysql.auto.build(anno.name = "", buildver = "hg19",
  database.dir = "/path/", mysql.connect.params = list(user = "", password =
  "", host = "localhost", port = "3306"), overwrite = FALSE, append = FALSE,
  index = "chr_start_index", db.type = "mysql",
  database.cfg = system.file("extdata", "config/databases.toml", package =
  "annovarR"), extra_fread_params = list(sep = "\t", header = TRUE, return_1L
  = FALSE), mysql.build.params = list(fread.params = list(sep = "\t")),
  batch_lines = 1e+07, start_index = 1, new.colnames = NULL,
  verbose = TRUE)

Arguments

anno.name

Annotation name, eg. avsnp138, avsnp147, 1000g2015aug_all

buildver

Genome version, hg19, hg38, mm10 and others

database.dir

Dir of the databases

mysql.connect.params

Mysql parameters, [host, dbname, table.name, user, password etc.]

overwrite

Logical indicating wheather overwrite sqlite database, default is FALSE

append

Logical indicating wheather append the data to sqlite database, default is FALSE

index

Index name in sqlite

db.type

Setting the database type (sqlite, txt or mysql)

database.cfg

Configuration file of annovarR databases infomation

extra_fread_params

Pass to batch_file, default is to get value from database.cfg

mysql.build.params

Extra params pass to mysql.build

batch_lines

Parameters pass to batch_file, default is 10000000

start_index

default is 1, control the skip rows, n = (i-1) * batch_lines

new.colnames

Use the fread determined colnames or use new colnames

verbose

Logical indicating wheather print the extra log infomation

Examples

Run this code
# NOT RUN {
i <- 'hg19_avsnp147'
database <- system.file('extdata', sprintf('demo/%s.txt', i), package = 'annovarR')
file.copy(database, sprintf('%s/%s.txt', tempdir(), i))
# }
# NOT RUN {
 mysql.auto.build(anno.name = 'avsnp147', database.dir = tempdir(), 
 mysql.connect.params = list(user = 'username', password = 'password', 
 host = 'localhost', port = 3306, dbname = 'annovarR'))
# }

Run the code above in your browser using DataLab