getNamesAndNodes: Download names and nodes files from NCBI

View source: R/taxa.R

getNamesAndNodesR Documentation

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
)

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

Value

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

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

## Not run: 
  getNamesAndNodes()

## End(Not run)

taxonomizr documentation built on May 29, 2024, 8:49 a.m.