getAccession2taxid | R Documentation |
Download a nucl_xxx.accession2taxid.gz from NCBI servers. These can then be used to create a SQLite datanase with read.accession2taxid
. 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.
getAccession2taxid( outDir = ".", baseUrl = sprintf("%s://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid/", protocol), types = c("nucl_gb", "nucl_wgs"), protocol = "ftp" )
outDir |
the directory to put the accession2taxid.gz files in |
baseUrl |
the url of the directory where accession2taxid.gz files are located |
types |
the types if accession2taxid.gz files desired where type is the prefix of xxx.accession2taxid.gz. The default is to download all nucl_ accessions. For protein accessions, try |
protocol |
the protocol to be used for downloading. Probably either |
a vector of file path strings of the locations of the output files
https://ftp.ncbi.nih.gov/pub/taxonomy/, https://www.ncbi.nlm.nih.gov/genbank/acc_prefix/
read.accession2taxid
## Not run: if(readline( "This will download a lot data and take a while to process. Make sure you have space and bandwidth. Type y to continue: " )!='y') stop('This is a stop to make sure no one downloads a bunch of data unintentionally') getAccession2taxid() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.