Learn R Programming

taxonomizr (version 0.10.6)

getNamesAndNodes: Download names and nodes files from NCBI

Description

Download a taxdump.tar.gz file from NCBI servers and extract the names.dmp and nodes.dmp files from it. These can then be used to create a SQLite database with read.names.sql and read.nodes.sql. Note that if the files already exist in the target directory then this function will not redownload them. Delete the files if a fresh download is desired.

Usage

getNamesAndNodes(
  outDir = ".",
  url = sprintf("%s://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz", protocol),
  fileNames = c("names.dmp", "nodes.dmp"),
  protocol = "ftp",
  resume = TRUE
)

Value

a vector of file path strings of the locations of the output files

Arguments

outDir

the directory to put names.dmp and nodes.dmp in

url

the url where taxdump.tar.gz is located

fileNames

the filenames desired from the tar.gz file

protocol

the protocol to be used for downloading. Probably either 'http' or 'ftp'. Overridden if url is provided directly

resume

if TRUE attempt to resume downloading an interrupted file without starting over from the beginning

References

https://ftp.ncbi.nih.gov/pub/taxonomy/, https://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/

See Also

read.nodes.sql, read.names.sql

Examples

Run this code
if (FALSE) {
  getNamesAndNodes()
}

Run the code above in your browser using DataLab