-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathREADME.Rmd
155 lines (104 loc) · 6.88 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
europepmc - R Interface to Europe PMC RESTful Web Service
===
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
)
```
[![R build status](https://github.com/ropensci/europepmc/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/europepmc/actions)
[![codecov.io](https://codecov.io/github/ropensci/europepmc/coverage.svg?branch=master)](https://app.codecov.io/github/ropensci/europepmc?branch=master)
[![cran version](https://www.r-pkg.org/badges/version/europepmc)](https://cran.r-project.org/package=europepmc)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/europepmc)](https://github.com/r-hub/cranlogs.app)
[![](https://badges.ropensci.org/29_status.svg)](https://github.com/ropensci/software-review/issues/29)
europepmc facilitates access to the [Europe PMC RESTful Web
Service](https://europepmc.org/RestfulWebService). The client furthermore supports the [Europe PMC Annotations API](https://europepmc.org/AnnotationsApi) to retrieve text-mined concepts and terms per article.
[Europe PMC](https://europepmc.org/) covers life science literature and
gives access to open access full texts. Europe
PMC ingests all PubMed content and extends its index with other literature and patent sources.
For more infos on Europe PMC, see:
<https://europepmc.org/About>
Ferguson, C., Araújo, D., Faulk, L., Gou, Y., Hamelers, A., Huang, Z.,
Ide-Smith, M., Levchenko, M., Marinos, N., Nambiar, R., Nassar, M., Parkin, M., Pi, X., Rahman, F., Rogers, F., Roochun, Y., Saha, S., Selim, M., Shafique, Z., … McEntyre, J. (2020). Europe PMC in 2020. Nucleic Acids Research, 49(D1), D1507–D1514. <https://doi.org/10.1093/nar/gkaa994>.
## Implemented API methods
This client supports the following API methods from the [Articles RESTful API](https://europepmc.org/RestfulWebService):
|API-Method |Description |R functions |
|:--------------|:--------------------------------------------------------------------------------------------|:------------------------------------------|
|search |Search Europe PMC and get detailed metadata |`epmc_search()`, `epmc_details()`, `epmc_search_by_doi()` |
|profile |Obtain a summary of hit counts for several Europe PMC databases |`epmc_profile()` |
|citations |Load metadata representing citing articles for a given publication |`epmc_citations()` |
|references |Retrieve the reference section of a publication |`epmc_refs()` |
|databaseLinks |Get links to biological databases such as UniProt or ENA |`epmc_db()`, `epmc_db_count()` |
|labslinks |Access links to Europe PMC provided by third parties |`epmc_lablinks()`, `epmc_lablinks_count()` |
|fullTextXML |Fetch full-texts deposited in PMC |`epmc_ftxt()` |
|bookXML |retrieve book XML formatted full text for the Open Access subset of the Europe PMC bookshelf |`epmc_ftxt_book()` |
From the [Europe PMC Annotations API](https://europepmc.org/AnnotationsApi):
|API-Method |Description |R functions |
|:-----------|:-------------|:-------------|
annotationsByArticleIds | Get the annotations contained in the list of articles specified | `epmc_annotations_by_id()` |
## Installation
From CRAN
```r
install.packages("europepmc")
```
The latest development version can be installed using the
[remotes](https://github.com/r-lib/remotes/) package:
```r
require(remotes)
install_github("ropensci/europepmc")
```
Loading into R
```{r}
library(europepmc)
```
## Search Europe PMC
The search covers both metadata (e.g. abstracts or title) and full texts. To
build your query, please refer to the comprehensive guidance on how to search
Europe PMC: <https://europepmc.org/help>. Provide your query in the Europe
PMC search syntax to `epmc_search()`.
```{r}
europepmc::epmc_search(query = '"2019-nCoV" OR "2019nCoV"')
```
Be aware that Europe PMC expands queries with MeSH synonyms by default. You can turn this behavior off using the `synonym = FALSE` parameter.
By default, `epmc_search()` returns 100 records. To adjust the limit, simply use
the `limit` parameter.
See vignette [Introducing europepmc, an R interface to Europe PMC RESTful API](https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html) for a long-form documentation about how to search Europe PMC with this client.
## Creating proper review graphs with `epmc_hits_trend()`
There is also a nice function allowing you to easily create review graphs like described in Maëlle
Salmon's [blog post](https://masalmon.eu/2017/05/14/evergreenreviewgraph/):
```{r, fig.path="man/figures/", fig.retina = 1}
tt_oa <- europepmc::epmc_hits_trend("Malaria", period = 1995:2019, synonym = FALSE)
tt_oa
# we use ggplot2 for plotting the graph
library(ggplot2)
ggplot(tt_oa, aes(year, query_hits / all_hits)) +
geom_point() +
geom_line() +
xlab("Year published") +
ylab("Proportion of articles on Malaria in Europe PMC")
```
For more info, read the vignette about creating literature review graphs:
<https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html>
## Re-use of europepmc
Check out the tidypmc package
<https://github.com/ropensci/tidypmc>
The package maintainer, Chris Stubben (@cstubben), has also created an Shiny App that allows you to search and browse Europe PMC:
<https://github.com/cstubben/euPMC>
## Other ways to access Europe PubMed Central
### Other APIs
- Data dumps: <https://europepmc.org/FtpSite>
- OAI service: <https://europepmc.org/OaiService>
- SOAP web service: <https://europepmc.org/SoapWebServices>
- Grants RESTful (Grist) API: <https://europepmc.org/GristAPI>
### Other R clients
- use rOpenSci's `oai` to get metadata and full text via Europe PMC's OAI interface: <https://github.com/ropensci/oai>
- use rOpenSci's `rentrez` to interact with [NCBI databases](https://www.ncbi.nlm.nih.gov/) such as PubMed: <https://github.com/ropensci/rentrez>
- rOpenSci's `fulltext` package gives access to supplementary material of open access life-science publications in Europe PMC: <https://github.com/ropensci-archive/fulltext>
## Meta
Please note that this project is released with a [Contributor Code of Conduct](https://docs.ropensci.org/europepmc/CONDUCT.html). By participating in this project you agree to abide by its terms.
License: GPL-3
Please use the issue tracker for bug reporting and feature requests.
---
[![rofooter](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org)