diff --git a/DESCRIPTION b/DESCRIPTION index d625ad5..5e5aa89 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,10 @@ Package: annovarR Type: Package -Title: Integrated Tool to Annotate Genetic Variants +Title: Integrated Framework to Annotate Genetic Variants Version: 1.0.0 Authors@R: person("Jianfeng", "Li", email = "lee_jianfeng@sjtu.edu.cn", role = c("aut", "cre")) Description: - Can be used to annotate genetic variants from genomic and transcriptome data. Published and in-house databases were introduced in annovarR. + The 'annovarR' package provides R functions as well as database resources which offer an integrated framework to annotate genetic variants from genome and transcriptome data. The wrapper functions of 'annovarR' unified the interface of many published annotation tools, such as 'VEP' (), 'ANNOVAR' (), 'vcfanno' () and 'AnnotationDbi' (). It also simplified the use of some of the external annotation tools in R. Besides, massive published genetic variants annotation databases were integrated into 'annovarR'. For example, 'annovarR' provides a newly RNA-seq allele frequency database, BRVar, which built from total 1,285 cases public B-progenitor acute lymphoblastic leukemia (B-ALL) transcriptome data. Depends: R (>= 3.3.0) URL: https://github.com/JhuangLab/annovarR diff --git a/R/annotation.R b/R/annotation.R index a08d44b..f5909b6 100644 --- a/R/annotation.R +++ b/R/annotation.R @@ -115,10 +115,12 @@ annotation.cols.match <- function(dat = data.table(), anno.name = "", buildver = #' start <- c('100188904', '100185955') #' end <- c('100188904', '100185955') #' dat <- data.table(chr = chr, start = start, end = end) -#' ##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]])}) +#' \dontrun{ +#' 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]])}) +#' } #' file.remove(bed.sqlite) annotation.region.match <- function(dat = data.table(), anno.name = "", buildver = "hg19", database.dir = Sys.getenv("annovarR_DB_DIR", ""), db.col.order = 1:3, index.cols = c("chr", diff --git a/R/annovarR.R b/R/annovarR.R index e1f719d..2b7aae8 100644 --- a/R/annovarR.R +++ b/R/annovarR.R @@ -1,6 +1,13 @@ -#' annovarR is an integrated database and tool to annotate genetic variants -#' from genomic and transcriptome sequencing data. -#' This work mainly based on ANNOVAR and other public annotation databases. +#' The 'annovarR' package provides R functions as well as database resources which offer an +#' integrated framework to annotate genetic variants from genome and transcriptome data. +#' The wrapper functions of 'annovarR' unified the interface of many published annotation tools, +#' such as 'VEP' (\url{http://asia.ensembl.org/info/docs/tools/vep/index.html}), +#' 'ANNOVAR' (\url{http://annovar.openbioinformatics.org/}), 'vcfanno' (\url{https://github.com/brentp/vcfanno}) +#' and 'AnnotationDbi' (\url{http://www.bioconductor.org/packages/release/bioc/html/AnnotationDbi.html}). +#' It also simplified the use of some of the external annotation tools in R. +#' Besides, massive published genetic variants annotation databases were integrated into 'annovarR'. +#' For example, 'annovarR' provides a newly RNA-seq allele frequency database, BRVar, +#' which built from total 1,285 cases public B-progenitor acute lymphoblastic leukemia (B-ALL) transcriptome data. #' #' @author #' Li Jianfeng \url{lee_jianfeng@sjtu.edu.cn} diff --git a/R/auto.R b/R/auto.R index 5b2beb5..6585604 100644 --- a/R/auto.R +++ b/R/auto.R @@ -185,9 +185,11 @@ sqlite.auto.index <- function(anno.name = "", buildver = "hg19", database.dir = #' i <- 'hg19_avsnp147' #' database <- system.file('extdata', sprintf('demo/%s.txt', i), package = 'annovarR') #' file.copy(database, sprintf('%s/%s.txt', tempdir(), i)) -#' ## mysql.auto.build(anno.name = 'avsnp147', database.dir = tempdir(), -#' ## mysql.connect.params = list(user = 'username', password = 'password', -#' ## host = 'localhost', port = 3306, dbname = 'annovarR')) +#' \dontrun{ +#' mysql.auto.build(anno.name = 'avsnp147', database.dir = tempdir(), +#' mysql.connect.params = list(user = 'username', password = 'password', +#' host = 'localhost', port = 3306, dbname = 'annovarR')) +#' } mysql.auto.build <- function(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", @@ -282,9 +284,11 @@ mysql.auto.build <- function(anno.name = "", buildver = "hg19", database.dir = " #' i <- 'hg19_avsnp147' #' database <- system.file('extdata', sprintf('demo/%s.txt', i), package = 'annovarR') #' file.copy(database, sprintf('%s/%s.txt', tempdir(), i)) -#' ## mysql.auto.index(anno.name = 'avsnp147', database.dir = tempdir(), -#' ## mysql.connect.params = list(user = 'username', password = 'password', -#' ## host = 'localhost', port = 3306, dbname = 'annovarR')) +#' \dontrun{ +#' mysql.auto.index(anno.name = 'avsnp147', database.dir = tempdir(), +#' mysql.connect.params = list(user = 'username', password = 'password', +#' host = 'localhost', port = 3306, dbname = 'annovarR')) +#' } mysql.auto.index <- function(anno.name = "", buildver = "hg19", database.dir = "/path/", mysql.connect.params = list(user = "", password = "", host = "localhost", port = "3306"), index = "chr_start_index", db.type = "mysql", database.cfg = system.file("extdata", diff --git a/R/build.R b/R/build.R index 3f81b4f..a2664b8 100644 --- a/R/build.R +++ b/R/build.R @@ -169,8 +169,10 @@ drop.sqlite.index <- function(sqlite.connect.params = list(dbname = "", table.na #' @export #' @examples #' test.dat <- system.file('extdata', 'demo/sqlite.dat.txt', package = 'annovarR') -#' ##mysql.build(test.dat, list(host = 'host', dbname = 'db', -#' ##table.name = 'table', user = 'user', password = 'password')) +#' \dontrun{ +#' mysql.build(test.dat, list(host = 'host', dbname = 'db', +#' table.name = 'table', user = 'user', password = 'password')) +#' } mysql.build <- function(filename = "", mysql.connect.params = list(host = "", dbname = "", table.name = "", user = "", password = ""), dat = data.table(), fread.params = list(), new.colnames = NULL, verbose = FALSE, ...) { @@ -219,8 +221,10 @@ mysql.build <- function(filename = "", mysql.connect.params = list(host = "", db #' @export #' @examples #' test.dat <- system.file('extdata', 'demo/sqlite.dat.txt', package = 'annovarR') -#' ##mysql.index(list(host = 'host', dbname = 'db', table.name = 'table', -#' ##user = 'user', password = 'password'), index = 'index_name', cols = c('V1', 'V2')) +#' \dontrun{ +#' mysql.index(list(host = 'host', dbname = 'db', table.name = 'table', +#' user = 'user', password = 'password'), index = 'index_name', cols = c('V1', 'V2')) +#' } mysql.index <- function(mysql.connect.params = list(host = "", dbname = "", table.name = "", user = "user", password = "password"), index = "", cols = c(), verbose = FALSE, ...) { @@ -262,8 +266,10 @@ mysql.index <- function(mysql.connect.params = list(host = "", dbname = "", tabl #' @export #' @examples #' test.dat <- system.file('extdata', 'demo/sqlite.dat.txt', package = 'annovarR') -#' ##drop.mysql.index(list(host = 'host', dbname = 'db', user = 'user', password = 'password'), -#' ##index = 'index_name') +#' \dontrun{ +#' drop.mysql.index(list(host = 'host', dbname = 'db', user = 'user', password = 'password'), +#' index = 'index_name') +#' } drop.mysql.index <- function(mysql.connect.params = list(host = "", dbname = "", table.name = "", user = "user", password = "password"), index = "", verbose = FALSE, ...) { diff --git a/R/get.R b/R/get.R index baf9865..7396b6f 100644 --- a/R/get.R +++ b/R/get.R @@ -124,8 +124,10 @@ sqlite.tb.colnames <- function(sqlite.connect.params = list(dbname = "", table.n #' @param ... Other parameters pass to dbConnect #' @export #' @examples -#' ##mysql.db.colnames(list(host = 'host', dbname = 'db', user = 'user', -#' ##password = 'password', table.name = 'table')) +#' \dontrun{ +#' mysql.db.colnames(list(host = 'host', dbname = 'db', user = 'user', +#' password = 'password', table.name = 'table')) +#' } mysql.tb.colnames <- function(mysql.connect.params = list(host = "", dbname = "", user = "", password = "", table.name = ""), ...) { mysql.connect.params <- config.list.merge(list(MySQL()), mysql.connect.params) diff --git a/man/annotation.region.match.Rd b/man/annotation.region.match.Rd index c7de9a3..786f7da 100644 --- a/man/annotation.region.match.Rd +++ b/man/annotation.region.match.Rd @@ -81,9 +81,11 @@ chr <- c('chr10', 'chr1') start <- c('100188904', '100185955') end <- c('100188904', '100185955') dat <- data.table(chr = chr, start = start, end = end) -##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]])}) +\dontrun{ +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]])}) +} file.remove(bed.sqlite) } diff --git a/man/annovarR.Rd b/man/annovarR.Rd index 97888e7..15fa638 100644 --- a/man/annovarR.Rd +++ b/man/annovarR.Rd @@ -4,13 +4,27 @@ \name{annovarR} \alias{annovarR} \alias{annovarR-package} -\title{annovarR is an integrated database and tool to annotate genetic variants -from genomic and transcriptome sequencing data. -This work mainly based on ANNOVAR and other public annotation databases.} +\title{The 'annovarR' package provides R functions as well as database resources which offer an +integrated framework to annotate genetic variants from genome and transcriptome data. +The wrapper functions of 'annovarR' unified the interface of many published annotation tools, +such as 'VEP' (\url{http://asia.ensembl.org/info/docs/tools/vep/index.html}), +'ANNOVAR' (\url{http://annovar.openbioinformatics.org/}), 'vcfanno' (\url{https://github.com/brentp/vcfanno}) +and 'AnnotationDbi' (\url{http://www.bioconductor.org/packages/release/bioc/html/AnnotationDbi.html}). +It also simplified the use of some of the external annotation tools in R. +Besides, massive published genetic variants annotation databases were integrated into 'annovarR'. +For example, 'annovarR' provides a newly RNA-seq allele frequency database, BRVar, +which built from total 1,285 cases public B-progenitor acute lymphoblastic leukemia (B-ALL) transcriptome data.} \description{ -annovarR is an integrated database and tool to annotate genetic variants -from genomic and transcriptome sequencing data. -This work mainly based on ANNOVAR and other public annotation databases. +The 'annovarR' package provides R functions as well as database resources which offer an +integrated framework to annotate genetic variants from genome and transcriptome data. +The wrapper functions of 'annovarR' unified the interface of many published annotation tools, +such as 'VEP' (\url{http://asia.ensembl.org/info/docs/tools/vep/index.html}), +'ANNOVAR' (\url{http://annovar.openbioinformatics.org/}), 'vcfanno' (\url{https://github.com/brentp/vcfanno}) +and 'AnnotationDbi' (\url{http://www.bioconductor.org/packages/release/bioc/html/AnnotationDbi.html}). +It also simplified the use of some of the external annotation tools in R. +Besides, massive published genetic variants annotation databases were integrated into 'annovarR'. +For example, 'annovarR' provides a newly RNA-seq allele frequency database, BRVar, +which built from total 1,285 cases public B-progenitor acute lymphoblastic leukemia (B-ALL) transcriptome data. } \seealso{ Useful links: diff --git a/man/drop.mysql.index.Rd b/man/drop.mysql.index.Rd index 409cd43..bec54d6 100644 --- a/man/drop.mysql.index.Rd +++ b/man/drop.mysql.index.Rd @@ -22,6 +22,8 @@ Drop search index of annovarR database table in mysql } \examples{ test.dat <- system.file('extdata', 'demo/sqlite.dat.txt', package = 'annovarR') -##drop.mysql.index(list(host = 'host', dbname = 'db', user = 'user', password = 'password'), -##index = 'index_name') +\dontrun{ +drop.mysql.index(list(host = 'host', dbname = 'db', user = 'user', password = 'password'), +index = 'index_name') +} } diff --git a/man/mysql.auto.build.Rd b/man/mysql.auto.build.Rd index c9b99bd..60be674 100644 --- a/man/mysql.auto.build.Rd +++ b/man/mysql.auto.build.Rd @@ -55,7 +55,9 @@ Build annovarR database in mysql (auto from extdata/config/database.toml) i <- 'hg19_avsnp147' database <- system.file('extdata', sprintf('demo/\%s.txt', i), package = 'annovarR') file.copy(database, sprintf('\%s/\%s.txt', tempdir(), i)) -## mysql.auto.build(anno.name = 'avsnp147', database.dir = tempdir(), -## mysql.connect.params = list(user = 'username', password = 'password', -## host = 'localhost', port = 3306, dbname = 'annovarR')) +\dontrun{ + mysql.auto.build(anno.name = 'avsnp147', database.dir = tempdir(), + mysql.connect.params = list(user = 'username', password = 'password', + host = 'localhost', port = 3306, dbname = 'annovarR')) +} } diff --git a/man/mysql.auto.index.Rd b/man/mysql.auto.index.Rd index e90ea59..2c27020 100644 --- a/man/mysql.auto.index.Rd +++ b/man/mysql.auto.index.Rd @@ -34,7 +34,9 @@ Index annovarR database in mysql (auto from extdata/config/database.toml) i <- 'hg19_avsnp147' database <- system.file('extdata', sprintf('demo/\%s.txt', i), package = 'annovarR') file.copy(database, sprintf('\%s/\%s.txt', tempdir(), i)) -## mysql.auto.index(anno.name = 'avsnp147', database.dir = tempdir(), -## mysql.connect.params = list(user = 'username', password = 'password', -## host = 'localhost', port = 3306, dbname = 'annovarR')) +\dontrun{ + mysql.auto.index(anno.name = 'avsnp147', database.dir = tempdir(), + mysql.connect.params = list(user = 'username', password = 'password', + host = 'localhost', port = 3306, dbname = 'annovarR')) +} } diff --git a/man/mysql.build.Rd b/man/mysql.build.Rd index c8206c2..f388893 100644 --- a/man/mysql.build.Rd +++ b/man/mysql.build.Rd @@ -28,6 +28,8 @@ Build annovarR database in mysql } \examples{ test.dat <- system.file('extdata', 'demo/sqlite.dat.txt', package = 'annovarR') -##mysql.build(test.dat, list(host = 'host', dbname = 'db', -##table.name = 'table', user = 'user', password = 'password')) +\dontrun{ +mysql.build(test.dat, list(host = 'host', dbname = 'db', +table.name = 'table', user = 'user', password = 'password')) +} } diff --git a/man/mysql.index.Rd b/man/mysql.index.Rd index 42f70c6..1501324 100644 --- a/man/mysql.index.Rd +++ b/man/mysql.index.Rd @@ -24,6 +24,8 @@ Generate search index of annovarR database table in mysql } \examples{ test.dat <- system.file('extdata', 'demo/sqlite.dat.txt', package = 'annovarR') -##mysql.index(list(host = 'host', dbname = 'db', table.name = 'table', -##user = 'user', password = 'password'), index = 'index_name', cols = c('V1', 'V2')) +\dontrun{ +mysql.index(list(host = 'host', dbname = 'db', table.name = 'table', +user = 'user', password = 'password'), index = 'index_name', cols = c('V1', 'V2')) +} } diff --git a/man/mysql.tb.colnames.Rd b/man/mysql.tb.colnames.Rd index 2789b64..e1d71a1 100644 --- a/man/mysql.tb.colnames.Rd +++ b/man/mysql.tb.colnames.Rd @@ -16,6 +16,8 @@ mysql.tb.colnames(mysql.connect.params = list(host = "", dbname = "", user = Get colnames of table of database in mysql } \examples{ -##mysql.db.colnames(list(host = 'host', dbname = 'db', user = 'user', -##password = 'password', table.name = 'table')) +\dontrun{ +mysql.db.colnames(list(host = 'host', dbname = 'db', user = 'user', +password = 'password', table.name = 'table')) +} }