Last chance! 50% off unlimited learning
Sale ends in
Get NCBI taxonomy UID from GenBankID
genbank2uid(id, batch_size = 100, ...)
A GenBank accession alphanumeric string, or a gi numeric string.
The number of queries to submit at a time.
Curl args passed on to GET
one or more NCBI taxonomic IDs
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.
# 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