taxonomizr-package | R Documentation |
Functions for assigning taxonomy to NCBI accession numbers and taxon IDs based on NCBI's accession2taxid and taxdump files. This package allows the user to download NCBI data dumps and create a local database for fast and local taxonomic assignment.
taxonomizr provides some simple functions to parse NCBI taxonomy files and accession dumps and efficiently use them to assign taxonomy to accession numbers or taxonomic IDs (https://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/). This is useful for example to assign taxonomy to BLAST results. This is all done locally after downloading the appropriate files from NCBI using included functions. The major functions are:
prepareDatabase
: download data from NCBI and prepare SQLite database
link{accessionToTaxa}
: convert accession numbers to taxonomic IDs
getTaxonomy
: convert taxonomic IDs to taxonomy
More specialized functions are:
getId
: convert a biological name to taxonomic ID
getAccessions
: find accessions for a given taxonomic ID
Maintainer: Scott Sherrill-Mix ssm@msu.edu
prepareDatabase
, accessionToTaxa
, getTaxonomy
## 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')
prepareDatabase('accessionTaxa.sql')
blastAccessions<-c("Z17430.1","Z17429.1","X62402.1")
ids<-accessionToTaxa(blastAccessions,'accessionTaxa.sql')
getTaxonomy(ids,'accessionTaxa.sql')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.