ropensci / rentrez

talk with NCBI entrez using R
https://docs.ropensci.org/rentrez
Other
195 stars 38 forks source link

Plus signs in queries #120

Closed arendsee closed 6 years ago

arendsee commented 6 years ago

Entrez supports long and short versions of tags, for example:

esearch.fcgi?db=taxonomy&term=Bacteria[Next+Level]

Is equivalent to

esearch.fcgi?db=taxonomy&term=Bacteria[NXLV]

But in rentrez:

# this works
rentrez::entrez_search(db='taxonomy', term='Bacteria[NXLV]')
# this doesn't
rentrez::entrez_search(db='taxonomy', term='Bacteria[Next+Level]')
# but if I remove the plus sign, all's well
rentrez::entrez_search(db='taxonomy', term='Bacteria[Next Level]')

This is pretty trivial (I'm even a little embarrassed to bring it up), but it could cause some confusion for people who copy and paste queries from URLs.

dwinter commented 6 years ago

Hi @arendsee ,

Sorry for the delay in getting to this: end of the year is a busy time. I can see how this could be confusing for folks moving queries from the web to rentrez. I'll leave this issue open until I make a note in the in-line docs, the vignette or both.

Thanks for submitting the issue, always like to hear how users are getting on with rentrez!