Introduction

in this vignette, you can learn the R functions usage of BioInstaller R package.

Key points:

Core R functions

Function set.biosoftwares.db() can be used to set a database file saving the information of installed software and database.

Next, you can use the function install.bioinfo(show.all.names = TRUE) get all soteware and database supported by BioInstaller.

When setting the show.all.versions to TRUE, the versions of software and database will be returned.

Parameter verbose in install.bioinfo can be used to show the extra debug information.

Besides, if you only want to download the source code or raw database files to a specific directory, the parameter download.dir and download.onlyare required.

# Install 'demo' with debug infomation
download.dir <- sprintf('%s/demo_2', tempdir())
install.bioinfo('demo', download.dir = download.dir, verbose = TRUE)
#> INFO [2018-08-22 23:02:21] Debug:name:demo
#> INFO [2018-08-22 23:02:21] Debug:destdir:
#> INFO [2018-08-22 23:02:21] Debug:db:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c854a986bef
#> INFO [2018-08-22 23:02:21] Debug:github.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github.toml
#> INFO [2018-08-22 23:02:21] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub.toml
#> INFO [2018-08-22 23:02:21] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_main.toml
#> INFO [2018-08-22 23:02:21] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_annovar.toml
#> INFO [2018-08-22 23:02:21] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_blast.toml
#> INFO [2018-08-22 23:02:22] Fetching demo versions....
#> INFO [2018-08-22 23:02:22] Install versions:GRCh37
#> INFO [2018-08-22 23:02:22] Now start to install demo in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_2.
#> INFO [2018-08-22 23:02:22] Running before install steps.
#> INFO [2018-08-22 23:02:22] Now start to download demo in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_2.
#> INFO [2018-08-22 23:02:23] Running install steps.
#> INFO [2018-08-22 23:02:23] Running after install successful steps.
#> INFO [2018-08-22 23:02:23] Running change.info for demo and be saved to /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c854a986bef
#> INFO [2018-08-22 23:02:23] Debug:Install by Github configuration file: 
#> INFO [2018-08-22 23:02:23] Debug:Install by Non Github configuration file: demo
#> INFO [2018-08-22 23:02:23] Installed successful list: demo
#> $fail.list
#> [1] ""
#> 
#> $success.list
#> [1] "demo"

# Download demo source code
download.dir <- sprintf('%s/demo_3', tempdir())
install.bioinfo('demo', download.dir = download.dir,
  download.only = TRUE, verbose = TRUE)
#> INFO [2018-08-22 23:02:23] Debug:name:demo
#> INFO [2018-08-22 23:02:23] Debug:destdir:
#> INFO [2018-08-22 23:02:23] Debug:db:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c854a986bef
#> INFO [2018-08-22 23:02:23] Debug:github.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github.toml
#> INFO [2018-08-22 23:02:23] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub.toml
#> INFO [2018-08-22 23:02:23] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_main.toml
#> INFO [2018-08-22 23:02:23] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_annovar.toml
#> INFO [2018-08-22 23:02:23] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_blast.toml
#> INFO [2018-08-22 23:02:23] Fetching demo versions....
#> INFO [2018-08-22 23:02:23] Install versions:GRCh37
#> INFO [2018-08-22 23:02:23] Now start to download demo in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_3.
#> INFO [2018-08-22 23:02:24] demo be downloaded in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_3 successful
#> [1] TRUE

After finishing the download step, typically, you need to install the software by running several commands or an installation script. BioInstaller stores the related installation script or commands in the configuration files, and you can one-click to install the related software or database.

Besides, BioInstaller will pass several parameters to installation command or script. Just like destdir of ./configure --prefix={{destdir}}; make; make install for compiling C program.

It is optional to create bin directory in the destdir, and copy all the executable files in it. The bin in destdir can be set in the variable PATH for re-use in any other working directory.

If you want to download the source code in A directory and install it to B directory, you need to simultaneously set the parameters destdir and download.dirin function install.bioinfo.

# 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())
destdir <- sprintf('%s/demo', tempdir())
install.bioinfo('demo', download.dir = download.dir, destdir = destdir)
#> INFO [2018-08-22 23:02:24] Debug:name:demo
#> INFO [2018-08-22 23:02:24] Debug:destdir:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo
#> INFO [2018-08-22 23:02:24] Debug:db:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c854a986bef
#> INFO [2018-08-22 23:02:24] Debug:github.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github.toml
#> INFO [2018-08-22 23:02:24] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub.toml
#> INFO [2018-08-22 23:02:24] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_main.toml
#> INFO [2018-08-22 23:02:24] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_annovar.toml
#> INFO [2018-08-22 23:02:24] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_blast.toml
#> INFO [2018-08-22 23:02:24] Fetching demo versions....
#> INFO [2018-08-22 23:02:24] Install versions:GRCh37
#> INFO [2018-08-22 23:02:24] Now start to install demo in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo.
#> INFO [2018-08-22 23:02:24] Running before install steps.
#> INFO [2018-08-22 23:02:24] Now start to download demo in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_source.
#> INFO [2018-08-22 23:02:25] Running install steps.
#> INFO [2018-08-22 23:02:25] Running after install successful steps.
#> INFO [2018-08-22 23:02:25] Running change.info for demo and be saved to /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c854a986bef
#> INFO [2018-08-22 23:02:25] Debug:Install by Github configuration file: 
#> INFO [2018-08-22 23:02:25] Debug:Install by Non Github configuration file: demo
#> INFO [2018-08-22 23:02:25] Installed successful list: demo
#> $fail.list
#> [1] ""
#> 
#> $success.list
#> [1] "demo"

Saved informations after installation

It is important to save related information of installation. This step can help you to use the software or database in the other pipeline. So, after installed the software and database, BioInstaller will save the information, such as software name, version, path, update time, in the database file set by function set.biosoftwares.db(), which also defined by environment variable BIO_SOFWARES_DB_ACTIVE.

Function get.info() can be used to get the saved information of installed software and databases.

When you want to delete the saved information, you can use function del.info.

config <- get.info('demo')
config
#> $installed
#> [1] TRUE
#> 
#> $source.dir
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/demo_1"
#> 
#> $bin_dir
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/demo_1"
#> 
#> $executable_files
#> [1] ""
#> 
#> $install.dir
#> [1] "/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_1"
#> 
#> $version
#> [1] "GRCh37"
#> 
#> $last.update.time
#> [1] "2018-08-22 23:02:26"
#> 
#> attr(,"config")
#> [1] "demo"
#> attr(,"configtype")
#> [1] "yaml"
#> attr(,"file")
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/file13c856cc14ba3"

config <- configr::read.config(temp.db)
config$demo$comments <- 'This is a demo.'
params <- list(config.dat = config, file.path = temp.db)
do.call(configr::write.config, params)
#> [1] TRUE
get.info('demo')
#> $installed
#> [1] "TRUE"
#> 
#> $source.dir
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/demo_1"
#> 
#> $bin_dir
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/demo_1"
#> 
#> $install.dir
#> [1] "/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/demo_1"
#> 
#> $version
#> [1] "GRCh37"
#> 
#> $last.update.time
#> [1] "2018-08-22 23:02:26"
#> 
#> $comments
#> [1] "This is a demo."
#> 
#> attr(,"config")
#> [1] "demo"
#> attr(,"configtype")
#> [1] "ini"
#> attr(,"file")
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/file13c856cc14ba3"
del.info('demo')
#> [1] TRUE

Local mode

Local mode of BioInstaller was useful when you have downloaded the source code or database file, and have not run the install steps.

Tips:

download.dir <- sprintf('%s/github_demo_local', tempdir())
tryCatch({
install.bioinfo('github_demo', download.dir = download.dir, download.only = TRUE, verbose = FALSE)
install.bioinfo('github_demo', local.source = download.dir)}, error = function(e) {
  message("Please check the SSL or connection with GitHub")
})
#> cloning into '/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/github_demo_local'...
#> Receiving objects:  16% (1/6),    0 kb
#> Receiving objects:  33% (2/6),    0 kb
#> Receiving objects:  50% (3/6),    0 kb
#> Receiving objects:  66% (4/6),    0 kb
#> Receiving objects:  83% (5/6),    0 kb
#> Receiving objects: 100% (6/6),    0 kb, done.
#> INFO [2018-08-22 23:02:29] Debug:name:github_demo
#> INFO [2018-08-22 23:02:29] Debug:destdir:
#> INFO [2018-08-22 23:02:29] Debug:db:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c856cc14ba3
#> INFO [2018-08-22 23:02:29] Debug:github.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github.toml
#> INFO [2018-08-22 23:02:29] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub.toml
#> INFO [2018-08-22 23:02:29] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_main.toml
#> INFO [2018-08-22 23:02:29] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_annovar.toml
#> INFO [2018-08-22 23:02:29] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_blast.toml
#> INFO [2018-08-22 23:02:29] Fetching github_demo versions....
#> INFO [2018-08-22 23:02:30] Install versions:master
#> INFO [2018-08-22 23:02:30] Now start to install github_demo in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/github_demo.
#> INFO [2018-08-22 23:02:30] Running before install steps.
#> INFO [2018-08-22 23:02:30] Running install steps.
#> INFO [2018-08-22 23:02:30] Running after install successful steps.
#> INFO [2018-08-22 23:02:30] Running change.info for github_demo and be saved to /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c856cc14ba3
#> INFO [2018-08-22 23:02:30] Debug:Install by Github configuration file: github_demo
#> INFO [2018-08-22 23:02:30] Debug:Install by Non Github configuration file: 
#> INFO [2018-08-22 23:02:30] Installed successful list: github_demo
#> $fail.list
#> [1] ""
#> 
#> $success.list
#> [1] "github_demo"

download.dir <- sprintf('%s/demo_local', tempdir())
install.bioinfo('demo_2', download.dir = download.dir, download.only = TRUE, verbose = FALSE)
#> [1] TRUE
install.bioinfo('demo_2', download.dir = download.dir, local.source = sprintf('%s/GRCh37_MT_ensGene.txt.gz', download.dir), decompress = TRUE)
#> INFO [2018-08-22 23:02:31] Debug:name:demo_2
#> INFO [2018-08-22 23:02:31] Debug:destdir:
#> INFO [2018-08-22 23:02:31] Debug:db:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c856cc14ba3
#> INFO [2018-08-22 23:02:31] Debug:github.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github.toml
#> INFO [2018-08-22 23:02:31] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub.toml
#> INFO [2018-08-22 23:02:31] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_main.toml
#> INFO [2018-08-22 23:02:31] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_annovar.toml
#> INFO [2018-08-22 23:02:31] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_blast.toml
#> INFO [2018-08-22 23:02:32] Fetching demo_2 versions....
#> INFO [2018-08-22 23:02:32] Install versions:GRCh37
#> INFO [2018-08-22 23:02:32] Now start to install demo_2 in /private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpfQa2ER/demo_local.
#> INFO [2018-08-22 23:02:32] Running before install steps.
#> INFO [2018-08-22 23:02:32] Running install steps.
#> INFO [2018-08-22 23:02:32] Running after install successful steps.
#> INFO [2018-08-22 23:02:32] Running change.info for demo_2 and be saved to /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c856cc14ba3
#> INFO [2018-08-22 23:02:32] Debug:Install by Github configuration file: 
#> INFO [2018-08-22 23:02:32] Debug:Install by Non Github configuration file: demo_2
#> INFO [2018-08-22 23:02:32] Installed successful list: demo_2
#> $fail.list
#> [1] ""
#> 
#> $success.list
#> [1] "demo_2"

Download all versions

Function craw.all.version is the simplest method to download all available URL files in nongithub or database files.

Meta information of software and database

Function get.meta can be used to get all software and databases meta information, such as description and publication, supported by BioInstaller.

# Get all meta source files
meta_files <- get.meta.files()
meta_files
#> $db_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_meta.toml"
#> 
#> $github_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github_meta.toml"
#> 
#> $nongithub_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub_meta.toml"
#> 
#> $web_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/web/web_meta.toml"

# Get all of meta informaton in BioInstaller
meta <- get.meta()
names(meta)
#> [1] "db_meta_file"        "github_meta_file"    "nongithub_meta_file"
#> [4] "web_meta_file"       "db"                  "github"             
#> [7] "nongithub"           "title"               "web"
meta[1:4]
#> $db_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_meta.toml"
#> 
#> $github_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github_meta.toml"
#> 
#> $nongithub_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/nongithub/nongithub_meta.toml"
#> 
#> $web_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/web/web_meta.toml"
meta$db$cfg_meta
#> $avaliable_cfg
#> [1] "db_annovar.toml" "db_blast.toml"   "db_main.toml"   
#> 
#> $cfg_dir
#> [1] "@>@system.file('extdata', 'config/db', package = 'BioInstaller')@<@"
#> 
#> $prefix_url
#> [1] "https://raw.githubusercontent.com/JhuangLab/BioInstaller/master/inst/extdata/config/db/"
meta$db$item$atcircdb
#> $description
#> [1] "Circular RNA not only functions as a potential competitive target for miRNA, but also regulates transcription and interacts with RNA-binding proteins. Because of the structural stability of the circular form, these molecules are promising candidates for intervening in a number of biological pathways, and may be a high value tool for pharmaceutical research in human and photosynthesis in plant.Based on our previous research, we systematically investigated 622 RNA-Seq samples from 87 indepedent studies hosted at NCBI SRA, and extracted all related circular RNAs. To improve the prediction accuracy, we not only applied a straightforward metric to screen and rank the circular RNA, but also incorporated exon boundaries as well as circular RNA candidates from previous studies into this resource to provide robust evidence for experimental biologists. In regards of the interaction between miRNA and circular RNAs, we utilized psRNAtarget and TAPIR to evaluate the statistical significance. Together, this database will host all predicted and validated Arabidopsis circular RNAs, and provide valuable and comprehensive information for studying this newly emerging non-coding RNA."
#> 
#> $publication
#> [1] "Ye J, Wang L, Li S, Zhang Q, Zhang Q, Tang W, Wang K, Song K, Sablok G, Sun X*, Zhao H*; AtCircDB: a tissue-specific database for Arabidopsis circular RNAs. Brief Bioinform 2017 bbx089. doi: 10.1093/bib/bbx089."                                                     
#> [2] "Sun X, Wang L, Ding J, Wang Y, Wang J, Zhang X, Che Y, Liu Z, Zhang X, Ye J, Wang J, Sablok G, Deng Z, Zhao H. Integrative analysis of Arabidopsis thaliana transcriptomics reveals intuitive splicing mechanism for circular RNA. FEBS Lett. 2016. 590(20):3510-3516. "
#> 
#> $url
#> [1] "http://genome.sdau.edu.cn/circRNA/index.php"

# Examples of get.meta
db_cfg_meta <- get.meta(value = "cfg_meta", config = 'db')
db_cfg_meta
#> $avaliable_cfg
#> [1] "db_annovar.toml" "db_blast.toml"   "db_main.toml"   
#> 
#> $cfg_dir
#> [1] "@>@system.file('extdata', 'config/db', package = 'BioInstaller')@<@"
#> 
#> $prefix_url
#> [1] "https://raw.githubusercontent.com/JhuangLab/BioInstaller/master/inst/extdata/config/db/"

db_cfg_meta_parsed <- get.meta(value = 'cfg_meta', config = 'db', read.config.params = list(rcmd.parse = TRUE))
db_cfg_meta_parsed
#> $avaliable_cfg
#> [1] "db_annovar.toml" "db_blast.toml"   "db_main.toml"   
#> 
#> $cfg_dir
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db"
#> 
#> $prefix_url
#> [1] "https://raw.githubusercontent.com/JhuangLab/BioInstaller/master/inst/extdata/config/db/"

db_cfg_meta <- get.meta(config = 'github', value = 'item')
db_cfg_meta$bwa
#> $description
#> [1] "BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome. It consists of three algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is designed for Illumina sequence reads up to 100bp, while the rest two for longer sequences ranged from 70bp to a few megabases. BWA-MEM and BWA-SW share similar features such as the support of long reads and chimeric alignment, but BWA-MEM, which is the latest, is generally recommended as it is faster and more accurate. BWA-MEM also has better performance than BWA-backtrack for 70-100bp Illumina reads."
#> 
#> $publication
#> [1] "Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics, 25, 1754-1760. [PMID: 19451168]"
#> [2] "Li H. and Durbin R. (2010) Fast and accurate long-read alignment with Burrows-Wheeler transform. Bioinformatics, 26, 589-595. [PMID: 20080505]"   
#> [3] "Li H. (2013) Aligning sequence reads, clone sequences and assembly contigs with BWA-MEM. arXiv:1303.3997v2 [q-bio.GN]"                            
#> 
#> $title
#> [1] "Burrow-Wheeler Aligner for pairwise alignment between DNA sequences"

# Get databases meta file
db_meta_file <- get.meta(config = 'db_meta_file')
db_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_meta.toml"
db_meta_file <- meta_files[["db_meta_file"]]
db_meta_file
#> [1] "/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_meta.toml"

Download database

Database files are required for almost all bioinformatics data analysis pipeline, especially for sequence mapping and annotation steps. We hope BioInstaller can help you to access these resources easily in R, and you can use the function install.bioinfo directly download the supported databases.

Just like ANNOVAR and Bioconductor have done, we hope to establish a integrated and shared database pool in this tool.

# ANNOVAR
download.dir <- sprintf('%s/db_annovar', tempdir())
config.toml <- system.file("extdata", "config/db/db_annovar.toml", 
  package = "BioInstaller")
#install.bioinfo('db_ucsc_refgene', download.dir = download.dir, 
#  nongithub.cfg = config.toml, extra.list = list(buildver = "hg19"))

# db_main
download.dir <- sprintf('%s/db_main', tempdir())
config.toml <- system.file("extdata", "config/db/db_main.toml", 
  package = "BioInstaller")
install.bioinfo('db_diseaseenhancer', download.dir = download.dir, 
  nongithub.cfg = config.toml)
#> INFO [2018-08-22 23:02:34] Debug:name:db_diseaseenhancer
#> INFO [2018-08-22 23:02:34] Debug:destdir:
#> INFO [2018-08-22 23:02:34] Debug:db:/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c856cc14ba3
#> INFO [2018-08-22 23:02:34] Debug:github.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/github/github.toml
#> INFO [2018-08-22 23:02:34] Debug:nongithub.cfg:/private/var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T/RtmpLV8Wsi/Rinst13c7531e580df/BioInstaller/extdata/config/db/db_main.toml
#> INFO [2018-08-22 23:02:34] Fetching db_diseaseenhancer versions....
#> INFO [2018-08-22 23:02:34] Install versions:diseaseEnh5.1
#> INFO [2018-08-22 23:02:34] Now start to install db_diseaseenhancer in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/db_main.
#> INFO [2018-08-22 23:02:34] Running before install steps.
#> INFO [2018-08-22 23:02:34] Now start to download db_diseaseenhancer in /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/db_main.
#> INFO [2018-08-22 23:02:35] Running install steps.
#> INFO [2018-08-22 23:02:35] Running after install successful steps.
#> INFO [2018-08-22 23:02:35] Running change.info for db_diseaseenhancer and be saved to /var/folders/nc/yl5qhkkn6vxf_m7s_yz2kzvh0000gn/T//RtmpfQa2ER/file13c856cc14ba3
#> INFO [2018-08-22 23:02:35] Debug:Install by Github configuration file: 
#> INFO [2018-08-22 23:02:35] Debug:Install by Non Github configuration file: db_diseaseenhancer
#> INFO [2018-08-22 23:02:35] Installed successful list: db_diseaseenhancer
#> $fail.list
#> [1] ""
#> 
#> $success.list
#> [1] "db_diseaseenhancer"

Write you own configuration file

If the software and database have not been supported by BioInstaller, you can write your own YAML or TOML format configuration file. A related vignette can help you to do this.

Session info

Here is the output of sessionInfo() on the system on which this document was compiled:

#> R version 3.5.0 (2018-04-23)
#> Platform: x86_64-apple-darwin15.6.0 (64-bit)
#> Running under: macOS High Sierra 10.13.6
#> 
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
#> 
#> locale:
#> [1] C/UTF-8/C/C/C/C
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] rvest_0.3.2        xml2_1.2.0         stringr_1.3.1     
#> [4] RCurl_1.95-4.10    bitops_1.0-6       BioInstaller_0.3.6
#> 
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_0.12.17         later_0.7.3          git2r_0.21.0.9002   
#>  [4] compiler_3.5.0       formatR_1.5          futile.logger_1.4.3 
#>  [7] R.methodsS3_1.7.1    futile.options_1.0.1 prettydoc_0.2.1     
#> [10] R.utils_2.6.0        tools_3.5.0          digest_0.6.15       
#> [13] bit_1.1-14           jsonlite_1.5         RSQLite_2.1.1       
#> [16] evaluate_0.10.1      memoise_1.1.0        shiny_1.1.0         
#> [19] DBI_1.0.0            crosstalk_1.0.0      curl_3.2            
#> [22] yaml_2.1.19          withr_2.1.2          httr_1.3.1          
#> [25] configr_0.3.3        knitr_1.20           htmlwidgets_1.2     
#> [28] devtools_1.13.6      rappdirs_0.3.1       DT_0.4              
#> [31] rprojroot_1.3-2      bit64_0.9-7          glue_1.2.0          
#> [34] R6_2.2.2             rmarkdown_1.10       liteq_1.0.1         
#> [37] lambda.r_1.2.3       blob_1.1.1           magrittr_1.5        
#> [40] promises_1.0.1       backports_1.1.2      htmltools_0.3.6     
#> [43] assertthat_0.2.0     xtable_1.8-2         mime_0.5            
#> [46] httpuv_1.4.4.1       stringi_1.2.3        ini_0.3.1           
#> [49] RcppTOML_0.1.3       R.oo_1.22.0