The euPMC
package formats epmc_search
results from europepmc and outputs Markdown reference lists, Javascript DataTables, and publication time series. Use devtools
to install the packages from GitHub.
library(devtools) install_github("ropensci/europepmc") install_github("cstubben/euPMC")
Try searching Europe PMC using the Shiny app to view some example tables and plots (specific terms like Yersinia pestis virulence with a few hundred matches over many years work best).
https://cstubben.shinyapps.io/euPMC/
A detailed description of search fields and example queries are available from the Europe PMC help pages. The first example searches for Yersinia pestis virulence in the title from MEDLINE sources (with pubmed IDs). The epmc_hits
function returns the number of hits, which can then be used to adjust the default limit of 25 results in epmc_search
.
library(europepmc) library(euPMC) query <- "title:(Yersinia pestis virulence) AND src:MED" epmc_hits(query) # [1] 148 yp <- epmc_search(query, limit=200) # 148 records found, returning 148 dplyr::filter(yp, pmid==23357388) %>% t() [,1] id "23357388" source "MED" pmid "23357388" pmcid "PMC3639585" doi "10.1128/IAI.01417-12" title "RfaL is required for Yersinia pestis type III secretion and virulence." authorString "Houppert AS, Bohman L, Merritt PM, Cole CB, Caulfield AJ, Lathem WW, Marketon MM." journalTitle "Infect Immun" issue "4" journalVolume "81" pubYear "2013" journalIssn "0019-9567; 1098-5522; " pageInfo "1186-1197" pubType "research support, non-u.s. gov't; research-article; journal article; research ..." isOpenAccess "N" inEPMC "Y" inPMC "Y" hasPDF "Y" hasBook "N" hasSuppl "Y" citedByCount "7" hasReferences "Y" hasTextMinedTerms "Y" hasDbCrossReferences "N" hasLabsLinks "Y" hasTMAccessionNumbers "N" firstPublicationDate "2013-01-28"
The next query downloads seven papers citing Houppert et al. 2013 above.
x <- epmc_search( "cites:23357388_MED") # 7 records found, returning 7
bib_format
uses helper functions authors_etal
and journal_cite
to format author, year, title and journal and optionally add Pubmed IDs and cited by counts into a reference list. Markdown links are added to journals, PubMed IDs and Cited By counts if displayed.
x <- arrange(x, authorString) bib_format(x) bib_format(x, number=TRUE, pmid=TRUE, cited =TRUE, links=TRUE) cat(strwrap(bib_format(x, number=TRUE, links=TRUE), width=100, exdent=3), sep="\n")
DT_format
adds html links to PubMed IDs, journal and cited by counts for displaying using the DT
package.
library(DT) y<-DT_format(yp) datatable(y, escape = c(1,5), caption="Publications with Yersinia pestis virulence in the title")
The year_ts
function creates yearly time-series objects using the publication year for plotting using the dygraphs
package.
y <- year_ts(yp) dygraph(y, xlab="Year published", ylab="Articles per year")
The final query returns publications with the species Waddlia chondrophila in the abstract.
query <- 'abstract:"Waddlia chondrophila" AND SRC:MED' epmc_hits(query) [1] 73 wc <- epmc_search(query, limit =100) dplyr::count(wc, journalTitle, sort=TRUE) # # A tibble: 43 x 2 # journalTitle n # <chr> <int> # 1 Microbes Infect 8 # 2 PLoS One 6 # 3 Emerg Infect Dis 4 # 4 New Microbes New Infect 4 # 5 Clin Microbiol Infect 3 # 6 FEMS Immunol Med Microbiol 3 # 7 J Vet Diagn Invest 3 # 8 Microbiology 3 # 9 Vet Microbiol 3 #10 Eur J Clin Microbiol Infect Dis 2
The package also includes a list of journals indexed in MEDLINE in the NLM catalog at NCBI. This table includes MeSH terms assigned to the journal, which can be used to summarize the publications about Waddlia chondrophila (which could be considered a new emerging zoonotic pathogen based on the journal sources).
data(nlm) inner_join(wc, nlm, by=c(journalTitle="ta")) %>% tidyr::separate_rows(mesh, sep="; ") %>% dplyr::count(mesh, sort=TRUE) # # A tibble: 57 x 2 # mesh n # <chr> <int> # 1 Microbiology* 19 # 2 Immunity* 9 # 3 Infection 9 # 4 Communicable Diseases* 7 # 5 Medicine* 7 # 6 Science 6 # 7 Veterinary Medicine* 6 # 8 Infection* 5 # 9 Allergy and Immunology* 4 #10 Communicable Disease Control* 4 ## ... with 47 more rows
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4