Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Miachol committed Sep 18, 2017
2 parents e856ef6 + 09825f7 commit 325ccb8
Show file tree
Hide file tree
Showing 11 changed files with 438 additions and 13 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2017-09-18 Li Jianfeng <lee_jianfeng@sjtu.edu.cn>

* fix invalid test link
* ANNOVAR databases can be download use
inst/extdata/databases/ANNOVAR.toml
* Move databases toml file to inst/extdata/databases/
* DRAT and fastq-tools be added

2017-07-24 Li Jianfeng <lee_jianfeng@sjtu.edu.cn>

* picard/mutect be added in inst/extdata/docker.toml
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: BioInstaller
Title: Lightweight Biology Software Installer
Version: 0.2.0
Version: 0.2.1
Authors@R: person("Jianfeng", "Li", email = "lee_jianfeng@sjtu.edu.cn", role = c("aut", "cre"))
Description:
Can be used to install and download massive bioinformatics analysis softwares and databases, such as NGS reads mapping tools with its required databases.
Depends:
R (>= 3.3.0)
URL: https://github.com/JhuangLab/BioInstaller, http://bioinfo.rjh.com.cn/labs/jhuang/tools/BioInstaller
URL: https://github.com/JhuangLab/BioInstaller
BugReports: https://github.com/JhuangLab/BioInstaller/issues
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down
393 changes: 393 additions & 0 deletions inst/extdata/databases/ANNOVAR.toml

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions inst/extdata/github.toml
Original file line number Diff line number Diff line change
Expand Up @@ -801,3 +801,17 @@ make_dir = "ensembl-vep"
[vep.install]
linux = 'perl INSTALL.pl'
mac = 'perl INSTALL.pl'

[dart]
github_url = "https://github.com/hsinnan75/DART"

[dart.install]
linux = "make"
mac = "make"

[fastq_tools]
github_url = "https://github.com/dcjones/fastq-tools"

[fastq_tools.install]
linux = ["sh autogen.sh && ./configure --prefix={{destdir}} && make", "make install"]
mac = ["sh autogen.sh && ./configure --prefix={{destdir}} && make", "make install"]
14 changes: 7 additions & 7 deletions inst/extdata/nongithub.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configuration file of install.softwares(Non-Github)
title = "Non-Github Configuration File"
[demo]
source_url = "http://bioinfo.rjh.com.cn/download/annovarR/humandb/{{version}}_MT_ensGene.txt"
source_url = "https://github.com/Miachol/ftp/blob/master/files/{{version}}_MT_ensGene.txt"
decompress = false
url_all_download = false
version_newest = "GRCh37"
Expand All @@ -12,7 +12,7 @@ make_dir = ["./"]
bin_dir = ["./"]

[demo_2]
source_url = "http://bioinfo.rjh.com.cn/download/annovarR/humandb/{{version}}_MT_ensGene.txt.gz"
source_url = "https://github.com/Miachol/ftp/blob/master/files/{{version}}_MT_ensGene.txt.gz"
url_all_download = false
version_newest = "GRCh37"
version_available = ["GRCh37"]
Expand Down Expand Up @@ -229,7 +229,7 @@ linux = "python setup.py install"
mac = "python setup.py install"

[novoalign]
source_url = ["http://bioinfo.rjh.com.cn/download/novocraft/novocraft{{version}}.tar.gz"]
source_url = ["https://github.com/Miachol/novocraft_releases/raw/master/novocraft{{version}}.tar.gz"]

version_newest = "V3.07.01.Linux3.0"

Expand Down Expand Up @@ -268,11 +268,11 @@ linux = "mkdir -p {{destdir}}/bin; fn=`ls -F |grep '*' | tr -d '*'`;cp $fn {{des
mac = "mkdir -p {{destdir}}/bin; fn=`ls -F |grep '*' | tr -d '*'`;cp $fn {{destdir}}/bin"

[gatk]
source_url = ["http://bioinfo.rjh.com.cn/download/gatk/gatk{{version}}.tar.gz"]
source_url = ["https://github.com/Miachol/gatk_releases/raw/master/gatk{{version}}.tar.gz"]

version_newest = "3.7-0"
version_newest = "3.8-0"

version_available = ["3.7-0", "3.7", "3.6", "3.5", "3.4-46"]
version_available = ["3.8-0", "3.7-0", "3.7", "3.6", "3.5", "3.4-46"]

after_failure = "echo 'fail!'"

Expand All @@ -287,7 +287,7 @@ linux = "mkdir -p {{destdir}}/bin; cp *.jar {{destdir}}/bin"
mac = "mkdir -p {{destdir}}/bin; cp *.jar {{destdir}}/bin"

[mutect]
source_url = ["http://bioinfo.rjh.com.cn/download/gatk/mutect{{version}}.zip"]
source_url = ["https://github.com/Miachol/gatk_releases/raw/master/mutect{{version}}.zip"]

version_newest = "1.1.7"

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ test_that("get.file.type", {
})

test_that("download.file.custom", {
url <- "http://bioinfo.rjh.com.cn/download/annovarR/humandb/GRCh37_MT_ensGene.txt"
url <- "https://github.com/Miachol/ftp/blob/master/files/GRCh37_MT_ensGene.txt"
destfile <- sprintf("%s/GRCh37", tempdir())
x <- download.file.custom(url, destfile, quiet = T)
expect_that(x, equals(0))
Expand Down
12 changes: 11 additions & 1 deletion vignettes/BioInstaller.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ download.dir <- sprintf('%s/demo_3', tempdir())
install.bioinfo('demo', download.dir = download.dir,
download.only = TRUE, verbose = TRUE)
# Set download.dir rrr destdir (destdir like /usr/local
# Set download.dir and destdir (destdir like /usr/local
# including bin, lib, include and others),
# destdir will work if install step {{destdir}} be used
download.dir <- sprintf('%s/demo_source', tempdir())
Expand Down Expand Up @@ -116,3 +116,13 @@ BioInstaller provide a `craw.all.version` function to try download all avaliable
download.dir <- sprintf('%s/craw_all_versions', tempdir())
craw.all.versions('demo', download.dir = download.dir)
```

## Download ANNOVAR databases

```{r}
download.dir <- sprintf('%s/ANNOVAR', tempdir())
config.toml <- system.file("extdata", "databases/ANNOVAR.toml",
package = "BioInstaller")
install.bioinfo('raw_ucsc_refgene', download.dir = download.dir,
nongithub.cfg = config.toml, extra.list = list(buildver = "hg19"))
```
4 changes: 2 additions & 2 deletions vignettes/write_configuration_file.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ Version control of non-github softwares and databases need a function parsing UR

## nongithub_databases_blast.toml

This configuration file can be used to download NCBI blast database: `install.bioinfo(nongithub.cfg = system.file('extdata', 'nongithub_databases_blast.toml', package = 'BioInstaller'), show.all.names = TRUE)`.
This configuration file can be used to download NCBI blast database: `install.bioinfo(nongithub.cfg = system.file('extdata', 'databases/blast.toml', package = 'BioInstaller'), show.all.names = TRUE)`.

BioInstaller use [configr](https://github.com/Miachol/configr) `glue` to reduce the length of files name. That using less word to storage more files name. More useful databases FTP url can be accessed in the future. I hope you can set your own configuration file not only use the BioInstaller built-in configuration files.

```{r}
library(configr)
library(BioInstaller)
blast.databases <- system.file('extdata',
'nongithub_databases_blast.toml', package = 'BioInstaller')
'databases/blast.toml', package = 'BioInstaller')
read.config(blast.databases)$blast_db_nr$source_url
read.config(blast.databases, glue.parse = TRUE)$blast_db_nr$source_url
Expand Down

0 comments on commit 325ccb8

Please sign in to comment.