ropensci/taxize — pull request #350 by zachary-foster (2014-09-25 11:57:20+00:00)
Title: make ncbi_search accept a taxon id

I want to search for sequences of a taxon using the unique taxon id instead of the name of the taxon. I modified ncbi_search to do this by adding a id option that can replace the taxa option if present. Entrez esearch can be queried with a taxon id by using the following term syntax: "xXarbitraryXx[porgn:__txid4751] ". "4751" is the taxon id for fungi in this case. My primary modification was to replace the name-based esearch term with the above when id is used instead of taxa. One minor porblem is that the getrelated option cannot be implemted as easily since it seems to assume a binomial species name. It is probably reasonable to fix this in the future by looking up the parent taxa using classification and using that instead of the genus part of a latin binomial. For now, I added a warning if id and getrelated are used together.

Let me know if you would like any changes made. This is my first ever pull request so please forgive me if I do something wrong. Thanks.