Skip to content

Commit

Permalink
rename annovarR to anor
Browse files Browse the repository at this point in the history
  • Loading branch information
Miachol committed Apr 20, 2020
1 parent c5778a9 commit 6ab186a
Show file tree
Hide file tree
Showing 203 changed files with 24,024 additions and 1,563 deletions.
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "make build"
},
{
"label": "test",
"type": "shell",
"command": "make test",
"problemMatcher": []
},
{
"label": "pkgdown_build",
"type": "shell",
"command": "Rscript -e 'pkgdown::build_site()'",
"problemMatcher": []
},
]
}
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

2018-02-26 Li Jianfeng <[email protected]>

* initial annovarR shiny App (inst/extdata/tools/shiny)
* initial anor shiny App (inst/extdata/tools/shiny)

2018-01-19 Li Jianfeng <[email protected]>

Expand Down
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: annovarR
Package: anor
Type: Package
Title: Integrated Framework to Annotate Genetic Variants
Version: 1.3
Authors@R: person("Jianfeng", "Li", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2349-208X"))
Description:
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.
The 'anor' 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 'anor' 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 'anor'. For example, 'anor' 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
BugReports: https://github.com/JhuangLab/annovarR/issues
URL: https://github.com/JhuangLab/anor
BugReports: https://github.com/JhuangLab/anor/issues
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand All @@ -29,7 +29,7 @@ Imports:
devtools,
AnnotationDbi,
liteq
RoxygenNote: 6.1.1
RoxygenNote: 7.1.0
Suggests: testthat,
knitr,
rmarkdown,
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ FROM bioinstaller/ngsjs:latest
## This handle reaches Jianfeng
MAINTAINER "Jianfeng Li" [email protected]

ADD . /tmp/annovarR
ADD . /tmp/anor

Run runuser -s /bin/bash -l opencpu -c "Rscript -e 'pacman::p_load(maftools, clusterProfiler, CEMiTool, org.Hs.eg.db, DT)'" \
&& runuser -s /bin/bash -l opencpu -c "Rscript -e 'devtools::install(\"/tmp/annovarR\", dependences = T)'" \
&& rm -rf /tmp/annovarR \
&& runuser -s /bin/bash -l opencpu -c "Rscript -e 'devtools::install(\"/tmp/anor\", dependences = T)'" \
&& rm -rf /tmp/anor \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)

all: doc build check_cran
all: doc build check

doc:
Rscript -e "devtools::document()"
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# annovarR 1.1.0
# anor 1.1.0

## New features

* Shiny app for maftools and gvmap

# annovarR 1.0.0
# anor 1.0.0

## New features

Expand Down
20 changes: 10 additions & 10 deletions R/annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
#' end <- c('10020', '10020', '10020')
#' ref <- c('A', 'A', 'A')
#' alt <- c('-', '-', '-')
#' database <- system.file('extdata', 'demo/hg19_avsnp147.txt', package = 'annovarR')
#' database <- system.file('extdata', 'demo/hg19_avsnp147.txt', package = 'anor')
#' database.dir <- dirname(database)
#' dat <- data.table(chr = chr, start = start, end = end, ref = ref, alt = alt)
#' x <- annotation.cols.match(dat, 'avsnp147', database.dir = database.dir,
#' return_col_names = 'avSNP147', db.type = 'txt')
annotation.cols.match <- function(dat = data.table(), anno.name = "", buildver = "hg19",
database.dir = Sys.getenv("annovarR_DB_DIR", ""), db_col_order = 1:5, index_cols = c("chr",
database.dir = Sys.getenv("anor_DB_DIR", ""), db_col_order = 1:5, index_cols = c("chr",
"start"), matched_cols = c("chr", "start", "end", "ref", "alt"), return_col_index = 6,
return_col_names = "", return_col_names_profix = "", format_dat_fun = format.cols,
dbname_fixed = NULL, table_name_fixed = NULL, setdb_fun = set.db, set_table_fun = set.table,
Expand Down Expand Up @@ -108,7 +108,7 @@ annotation.cols.match <- function(dat = data.table(), anno.name = "", buildver =
#' @export
#' @examples
#' library(data.table)
#' bed.file <- system.file('extdata', 'demo/example.bed', package = 'annovarR')
#' bed.file <- system.file('extdata', 'demo/example.bed', package = 'anor')
#' 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)
Expand All @@ -122,7 +122,7 @@ annotation.cols.match <- function(dat = data.table(), anno.name = "", buildver =
#' 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",
database.dir = Sys.getenv("anor_DB_DIR", ""), db_col_order = 1:3, index_cols = c("chr",
"start", "end"), full.matched_cols = "chr", inferior_col = "start", superior_col = "end",
return_col_index = 4, return_col_names = "", return_col_names_profix = "", format_dat_fun = format.cols,
dbname_fixed = NULL, table_name_fixed = NULL, setdb_fun = set.db, set_table_fun = set.table,
Expand Down Expand Up @@ -184,7 +184,7 @@ annotation.region.match <- function(dat = data.table(), anno.name = "", buildver
#' the names can be found on the http://annovar.openbioinformatics.org/en/latest/user-guide/download/
#' @param database.dir Dir of the databases
#' @param db.type Setting the database type (sqlite or txt)
#' @param database.cfg Configuration file of annovarR databases infomation
#' @param database.cfg Configuration file of anor databases infomation
#' @param func Function to anntate the dat data, default is to search the function in extdata/database.toml
#' @param mysql.connect.params Connect MySQL database other parameters,
#' e.g. list(host='11.11.11.1', port = '3306', user = '', password = '123456')
Expand All @@ -199,14 +199,14 @@ annotation.region.match <- function(dat = data.table(), anno.name = "", buildver
#' end <- c('10020', '10020', '10020')
#' ref <- c('A', 'A', 'A')
#' alt <- c('-', '-', '-')
#' database <- system.file('extdata', 'demo/hg19_avsnp147.txt', package = 'annovarR')
#' database <- system.file('extdata', 'demo/hg19_avsnp147.txt', package = 'anor')
#' database.dir <- dirname(database)
#' dat <- data.table(chr = chr, start = start, end = end, ref = ref, alt = alt)
#' x <- annotation(dat, 'avsnp147', database.dir = database.dir,
#' return_col_names = 'avSNP147', db.type = 'txt')
annotation <- function(dat = data.table(), anno.name = "", buildver = "hg19", annovar.anno.names = "",
database.dir = Sys.getenv("annovarR_DB_DIR", ""), db.type = NULL, database.cfg = system.file("extdata",
"config/databases.toml", package = "annovarR"), func = NULL, mysql.connect.params = list(host = "",
database.dir = Sys.getenv("anor_DB_DIR", ""), db.type = NULL, database.cfg = system.file("extdata",
"config/databases.toml", package = "anor"), func = NULL, mysql.connect.params = list(host = "",
dbname = "", table.name = "", user = "", password = ""), sqlite.connect.params = list(dbname = ""),
...) {
if (length(anno.name) > 1) {
Expand Down Expand Up @@ -244,7 +244,7 @@ annotation <- function(dat = data.table(), anno.name = "", buildver = "hg19", an
#' end <- c('10020', '10020', '10020')
#' ref <- c('A', 'A', 'A')
#' alt <- c('-', '-', '-')
#' database <- system.file('extdata', 'demo/hg19_avsnp147.txt', package = 'annovarR')
#' database <- system.file('extdata', 'demo/hg19_avsnp147.txt', package = 'anor')
#' database.dir <- dirname(database)
#' dat <- data.table(chr = chr, start = start, end = end, ref = ref, alt = alt)
#' x <- annotation.merge(dat = dat, anno.names = c('avsnp147'),
Expand All @@ -262,7 +262,7 @@ annotation.merge <- function(anno.names, ...) {
})
names(result.list.2) <- perl_annovar_names
if (length(result.list.1) != 0) {
return(list(annovarR = as.data.table(result.list.1), annovar = result.list.2))
return(list(anor = as.data.table(result.list.1), annovar = result.list.2))
} else {
return(list(annovar = result.list.2))
}
Expand Down
2 changes: 1 addition & 1 deletion R/annotation.utils.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# preprocess before to query with database
before.query.steps <- function(dat = data.table(), anno.name = "", buildver = "hg19",
database.dir = Sys.getenv("annovarR_DB_DIR", ""), db_col_order = 1:5, index_cols = c("chr",
database.dir = Sys.getenv("anor_DB_DIR", ""), db_col_order = 1:5, index_cols = c("chr",
"start"), matched_cols = c("chr", "start", "end", "ref", "alt"), format_dat_fun = format.cols,
dbname_fixed = NULL, table_name_fixed = NULL, setdb_fun = set.db, set_table_fun = set.table,
db.type = NULL, db.file.prefix = NULL, mysql.connect.params = list(), sqlite.connect.params = list(),
Expand Down
20 changes: 10 additions & 10 deletions R/annovarR.R → R/anor.R
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#' The 'annovarR' package provides R functions as well as database resources which offer an
#' The 'anor' 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,
#' The wrapper functions of 'anor' 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,
#' Besides, massive published genetic variants annotation databases were integrated into 'anor'.
#' For example, 'anor' 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{[email protected]}
#' @seealso
#' Useful links:
#'
#' \url{https://github.com/JhuangLab/annovarR}
#' \url{https://github.com/JhuangLab/anor}
#'
#' Report bugs at \url{https://github.com/JhuangLab/annovarR/issues}
#' Report bugs at \url{https://github.com/JhuangLab/anor/issues}
#'
#' @docType package
#' @name annovarR
#' @name anor
#' @import stringr DBI data.table futile.logger configr BioInstaller glue liteq
#' @importFrom stringi stri_rand_strings
#' @importFrom utils packageVersion head installed.packages compareVersion install.packages
Expand All @@ -35,9 +35,9 @@ NULL

.onAttach <- function(libname, pkgname) {
op <- options()
# msg <- sprintf('annovarR %s \n', packageVersion('annovarR')) msg <-
# sprintf('%s Documentation: ?annovarR, example(annovarR) and
# browseVignettes(\'annovarR\')', msg) packageStartupMessage(msg)
# msg <- sprintf('anor %s \n', packageVersion('anor')) msg <-
# sprintf('%s Documentation: ?anor, example(anor) and
# browseVignettes(\'anor\')', msg) packageStartupMessage(msg)
Sys.setenv(R_TESTS = "")
invisible()
}
Loading

0 comments on commit 6ab186a

Please sign in to comment.