blast_db_cache: Manage BLAST Database Downloads using BioCFileCache

View source: R/BiocFileCache.R

blast_db_cacheR Documentation

Manage BLAST Database Downloads using BioCFileCache

Description

Use BiocFileCache::BiocFileCache to manage local copies of BLAST database downloads. NCBI BLAST databases are updated daily and may be downloaded via FTP from https://ftp.ncbi.nlm.nih.gov/blast/db/.

Usage

blast_db_cache()

blast_db_get(
  file = "16S_ribosomal_RNA.tar.gz",
  baseURL = "https://ftp.ncbi.nlm.nih.gov/blast/db/",
  check_update = TRUE,
  verbose = TRUE
)

Arguments

file

the filename of the database.

baseURL

URL to download blast databases from. The default is NCBI's ftp server.

check_update

logical; update the local cache if there is a newer version of the file available on the server. This may take some time.

verbose

logical; display download information.

Details

The package maintains its own local cache which can be accessed using blast_db_cache().

Value

  • blast_db_cache() returns the path to the local BiocFileCache::BiocFileCache cache.

  • blast_db_get() returns the file path to a downloaded BLAST database file.

Author(s)

Michael Hahsler

See Also

Other blast: blast(), makeblastdb()

Examples

## get a database file (will be downloaded if the
##     local copy is not up-to-date)
db_16S <- blast_db_get("16S_ribosomal_RNA.tar.gz")
db_16S

## directly interacting with the local cache
library(BiocFileCache)

## show the package's cache directory
local_cache <- blast_db_cache()
local_cache

## bfc functions can be used to manage the local cache
bfcinfo(local_cache)

mhahsler/rBLAST documentation built on May 4, 2024, 11:11 p.m.