Skip to content

Commit

Permalink
update DESCRIPTION and document
Browse files Browse the repository at this point in the history
  • Loading branch information
Miachol committed Jan 8, 2018
1 parent 0179ee0 commit f498273
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 47 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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' (<http://asia.ensembl.org/info/docs/tools/vep/index.html>), 'ANNOVAR' (<http://annovar.openbioinformatics.org/>), 'vcfanno' (<https://github.com/brentp/vcfanno>) and 'AnnotationDbi' (<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.
Depends:
R (>= 3.3.0)
URL: https://github.com/JhuangLab/annovarR
Expand Down
10 changes: 6 additions & 4 deletions R/annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 10 additions & 3 deletions R/annovarR.R
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
16 changes: 10 additions & 6 deletions R/auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
18 changes: 12 additions & 6 deletions R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...) {
Expand Down Expand Up @@ -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,
...) {
Expand Down Expand Up @@ -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,
...) {
Expand Down
6 changes: 4 additions & 2 deletions R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions man/annotation.region.match.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions man/annovarR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/drop.mysql.index.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/mysql.auto.build.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/mysql.auto.index.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/mysql.build.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/mysql.index.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/mysql.tb.colnames.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f498273

Please sign in to comment.