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.
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.