# NOT RUN {
library(data.table)
bed.file <- system.file('extdata', 'demo/example.bed', package = 'annovarR')
bed.sqlite <- sprintf('%s/%s.sqlite', tempdir(), basename(bed.file))
connect.params <- list(dbname = bed.sqlite, table.name = 'bed')
sqlite.build(bed.file, connect.params)
chr <- c('chr10', 'chr1')
start <- c('100188904', '100185955')
end <- c('100188904', '100185955')
dat <- data.table(chr = chr, start = start, end = end)
# }
# NOT RUN {
x <- annotation.region.match(dat = dat, database.dir = tempdir(),
dbname.fixed = bed.sqlite, table.name.fixed = 'bed',
db.type = 'sqlite', format.dat.fun = function(...) {
params = list(...);return(params[[1]])})
# }
# NOT RUN {
file.remove(bed.sqlite)
# }
Run the code above in your browser using DataCamp Workspace