50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


taxize (version 0.8.9)

genbank2uid: Get NCBI taxonomy UID from GenBankID

Description

Get NCBI taxonomy UID from GenBankID

Usage

genbank2uid(id, batch_size = 100, ...)

Arguments

id

A GenBank accession alphanumeric string, or a gi numeric string.

batch_size

The number of queries to submit at a time.

...

Curl args passed on to GET

Value

one or more NCBI taxonomic IDs

Details

See http://www.ncbi.nlm.nih.gov/Sitemap/sequenceIDs.html for help on why there are two identifiers, and the difference between them.

Note that if you pass in > 1 item, if one or more of your items is not found, the entire batch will return NA's. To get around this, set batch_size = 1 - so each is sent separtaely to NCBI. However, this of course is much slower than the default, which is to send up to 100 at a time.

Examples

Run this code
# NOT RUN {
# with accession numbers
genbank2uid(id = 'AJ748748')
genbank2uid(id = 'Y13155')
genbank2uid(id = 'X78312')
genbank2uid(id = 'KM495596')

# with gi numbers
genbank2uid(id = 62689767)
genbank2uid(id = 22775511)
genbank2uid(id = 156446673)

# pass in many accession or gi numbers
genbank2uid(c(62689767,156446673))
genbank2uid(c('X78312','KM495596'))
genbank2uid(list('X78312',156446673))

# curl options
library('httr')
genbank2uid(id = 156446673, config=verbose())
# }

Run the code above in your browser using DataLab