Learn R Programming

genomes (version 2.16.0)

ncbiTaxonomy: NCBI taxonomy database

Description

Search the Entrez taxonomy database at NCBI

Usage

ncbiTaxonomy(term, summary=TRUE)

Arguments

term
either a valid Entrez search term or a vector of taxonomy Ids or names
summary
return results using Esummary (default) or Efetch

Value

Details

This function uses either Esummary or Efetch to return taxonomy data from NCBI. The Efetch XML include parent ids and lineage tags not found in Esummary XML. The term may be also be a vector of taxonomy Ids (joined using a comma) or taxonomy names (joined using "OR").

References

NCBI taxonomy database http://www.ncbi.nlm.nih.gov/sites/entrez?db=taxonomy

See Also

einfo for a list of fields in the taxonomy database.

Examples

Run this code

## Not run: 
# ncbiTaxonomy("Yersinia pestis")
# ncbiTaxonomy("Yersinia pestis", summary=FALSE)
# ncbiTaxonomy(c("Bacillus anthracis", "Yersinia pestis"))
# ncbiTaxonomy("cellular organisms[Next Level]")  
# # new Hantavirus species added in 2012
# ncbiTaxonomy("Hantavirus[subtree] AND 2012[date] AND species[rank]") 
# 
# # can also use Lineage field with esummary
# ncbiTaxonomy("Necocli virus[Lineage]")
# # compare to efetch results
# ncbiTaxonomy (1145238, FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab