taxonomizr-package: taxonomizr: Functions to Work with NCBI Accessions and...

taxonomizr-packageR Documentation

taxonomizr: Functions to Work with NCBI Accessions and Taxonomy

Description

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.

Details

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

Author(s)

Maintainer: Scott Sherrill-Mix shescott@upenn.edu

See Also

prepareDatabase, accessionToTaxa, getTaxonomy

Examples

## 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)

taxonomizr documentation built on Feb. 16, 2023, 6:25 p.m.