tags:

views:

112

answers:

2

I just came by the Ruby function

ncbi.esearch_count

Used in a recent post here (regarding the use of the word noval in publications), used to search in pubmed.

And I wonder how can it be done using R (via maybe Rcurl, or other library(XML) functions)?

Thanks.

+1  A: 

The Ruby function is part of the BioRuby library, which provides a wrapper around the NCBI EUtils. There was some brief discussion at the R Bioconductor mailing list regarding a wrapper for R, but I don't think that it went anywhere.

It is possible to use EUtils using RCurl and XML as you suggest. You construct the correct query URL, fetch the results using RCurl and parse using XML. I'd recommend reading the documentation in the second link for details about URLs; it is not very difficult. However, I don't think that there is a pure EUtils equivalent of BioRuby's very useful esearch_count().

EDIT: may be wrong on that last point, there is EGQuery.

neilfws
Hello Neilfws, Thank you for replying. I see the link in the link you gave is broken. I couldn't find the package refered to there - do you happen to know where to find it?
Tal Galili
I saw that too - which is why I suspect it was not developed further. There seems to be some code here - http://sites.google.com/site/gregorgorjanc/software - but it is dated 2006 and described as "proof of concept".
neilfws
How interesting. It appears Gregor already has a blog on R-bloggers.com. I just e-mailed him, and I hope he might be willing/able to help.
Tal Galili
I got a response - it seems that this package can work (I will simply need to rebuild it from binaries). Thank you for the help neilfws.
Tal Galili