Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I found an R script in R-blogger that can be used to track PubMed trend. The script needs Perl package TGen-EUtils to perform query and it is not available now.

It’s not difficult to query Pubmed record in R. We can use RCurl package to fetch and use XML package to parse the downloaded record as shown in stackoverflow.

Before I write my own script, I found that there is a well written package, RISmed, that provides many functions to access the NCBI databases.

I write a wrapper function called getPubmedTrend, which import EUtilsSummary and QueryCount from RISmed, to track PubMed trend. Another function called plotPubmedTrend was also implemented for visualizing the trend. These two functions is available in my toy package, yplots.

I run these functions with two influenza strains and RSV (Respiratory Syncytial Virus) between 2001 and 2014.

?View Code RSPLUS
 1 2 3  term = c('"H7N9"', '"H5N1"', '"RSV"') pm=getPubmedTrend(term, year=2001:2014) plotPubmedTrend(pm)

And here is the plot:

Based on the document, the search terms should be double quoted.

As shown in the above figure, there is a sharp increase of publication of H5N1 in 2006 since the H5N1 outbreak in 2005. Nobody care about the H7N9 until it cause an outbreak in 2013. The increase of publication number of H7N9 in 2013 is dramatically.