Learn R Programming

taxonomizr (version 0.2.2)

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 data.tables with read.names and read.nodes. 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 = "ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz",
  fileNames = c("names.dmp", "nodes.dmp"))

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

Value

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

References

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

See Also

read.nodes, read.names

Examples

Run this code
# NOT RUN {
  getNamesAndNodes()
# }

Run the code above in your browser using DataLab