This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScheduleTrialBibliographic.Rmd
234 lines (159 loc) · 8.97 KB
/
ScheduleTrialBibliographic.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
---
title: "Bibliographic Studies"
output: html_notebook
---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Cmd+Shift+Enter*.
```{r}
plot(cars)
```
Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Cmd+Option+I*.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Cmd+Shift+K* to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
subtitle: "MeSH Terms and Author Key Words In Pathology Articles From Turkey"
author: "Serdar Balci, MD, Pathologist"
date: '`r format(Sys.time())`'
output:
html_notebook:
code_folding: none
fig_caption: yes
highlight: kate
number_sections: yes
theme: cerulean
toc: yes
toc_float: yes
<!-- ```{r} -->
<!-- knitr::opts_chunk$set(message = FALSE, warning=FALSE, tidy = TRUE, error = TRUE) -->
<!-- ``` -->
<!-- ```{r} -->
<!-- library(rmarkdown) -->
<!-- ``` -->
<!-- # Background -->
<!-- PubMed collection from [National Library of Medicine](https://www.ncbi.nlm.nih.gov/pubmed/), has the most comprehensive information about peer reviewed articles in medicine. -->
<!-- [MeSH Terms](https://www.nlm.nih.gov/pubs/factsheets/mesh.html) is a controlled vocabulary that is used to label PubMed articles according to their content. It is done by experts in National Library of Medicine. Keywords are lables that are given by authors of the article. Both are included in a PubMed record of an article. -->
<!-- [EDirect](https://dataguide.nlm.nih.gov/edirect/install.html) is a valuable tool to identify various features of published articles that are indexed in PubMed. -->
<!-- # Aim -->
<!-- In this analysis we aimed to identify the most common topics investigated in Turkey and published in pathology journals. This may reveal the common research topics Turkish pathologists are interested. We extracted most common MeSH terms and keywords from PubMed articles using [EDirect](https://dataguide.nlm.nih.gov/edirect/overview.html): -->
<!-- [MeSH Terms Pathology Articles From Turkey](https://sbalci.github.io/pubmed/MeSH_Terms_Pathology_Articles_From_Turkey.html) -->
<!-- # Materials and Methods -->
<!-- **Methods:** -->
<!-- Packages used for analysis are given. `Tidyverse` is used for data manipulation, and [rstudioapi](https://github.com/rstudio/rstudio/issues/2193) to run e-utilities commands from RStudio. -->
<!-- ```{r load -if not present install- required packages} -->
<!-- usePackage <- function(p) -->
<!-- { -->
<!-- if (!is.element(p, installed.packages()[, 1])) -->
<!-- install.packages(p, dep = TRUE) -->
<!-- require(p, character.only = TRUE) -->
<!-- } -->
<!-- usePackage("tidyverse") -->
<!-- usePackage("rstudioapi") -->
<!-- usePackage("pander") -->
<!-- ``` -->
<!-- Pathology Journal ISSN List was retrieved from [In Cites Clarivate](https://jcr.incites.thomsonreuters.com/), and Journal Data Filtered as follows: -->
<!-- `JCR Year: 2016 Selected Editions: SCIE,SSCI Selected Categories: 'PATHOLOGY' Selected Category Scheme: WoS` -->
<!-- ```{r Get ISSN List from data downloaded from WoS} -->
<!-- # # Get ISSN List from data downloaded from WoS -->
<!-- # ISSNList <- JournalHomeGrid <- read_csv("/Users/serdarbalciold/RepTemplates/pubmed/data/JournalHomeGrid.csv", skip = 1) %>% -->
<!-- # select(ISSN) %>% -->
<!-- # filter(!is.na(ISSN)) %>% -->
<!-- # t() %>% -->
<!-- # paste("OR ", collapse = "") # add OR between ISSN List -->
<!-- # -->
<!-- # ISSNList <- gsub(" OR $", "" , ISSNList) # to remove last OR -->
<!-- ``` -->
<!-- Data is retrieved from PubMed via [e-Utilities](https://dataguide.nlm.nih.gov/). -->
<!-- The search formula for PubMed is generated as "ISSN List AND Country[Affiliation]" as described in [advanced search of PubMed](https://www.ncbi.nlm.nih.gov/pubmed/advanced). -->
<!-- ```{r Generate Search Formula For Pathology Journals AND Countries} -->
<!-- # # Generate Search Formula For Pathology Journals AND Countries -->
<!-- # searchformula <- -->
<!-- # paste("'", ISSNList, "'", " AND ", "Turkey[Affiliation]") -->
<!-- # write(searchformula, "/Users/serdarbalciold/RepTemplates/pubmed/data/searchformula.txt") -->
<!-- ``` -->
<!-- Articles are downloaded as `xml`. -->
```{r Search PubMed, write data as xml}
myTerm <- rstudioapi::terminalCreate(show = FALSE)
rstudioapi::terminalSend(
myTerm,
"esearch -db pubmed -query \"$(cat /Users/serdarbalciold/RepTemplates/pubmed/data/searchformula.txt)\" -datetype PDAT -mindate 1900 -maxdate 3000 | efetch -format xml > /Users/serdarbalciold/RepTemplates/pubmed/data/PathologyTurkey.xml \n"
)
Sys.sleep(1)
repeat {
Sys.sleep(0.1)
if (rstudioapi::terminalBusy(myTerm) == FALSE) {
print("Code Executed")
break
}
}
```
<!-- MeSH terms are extracted from xml. [Common terms](https://www.nlm.nih.gov/bsd/indexing/training/CHK_010.html) are excluded and [major topics](https://www.nlm.nih.gov/bsd/disted/meshtutorial/principlesofmedlinesubjectindexing/majortopics/) are selected. -->
<!-- ```{r extract major MeSH topics -excluding common tags- from xml, message=FALSE, warning=FALSE} -->
<!-- myTerm <- rstudioapi::terminalCreate(show = FALSE) -->
<!-- rstudioapi::terminalSend( -->
<!-- myTerm, -->
<!-- "xtract -input /Users/serdarbalciold/RepTemplates/pubmed/data/PathologyTurkey.xml -pattern MeshHeading -if DescriptorName@MajorTopicYN -equals Y -or QualifierName@MajorTopicYN -equals Y -element DescriptorName| grep -vxf /Users/serdarbalciold/RepTemplates/pubmed/data/checktags.txt | sort-uniq-count-rank > /Users/serdarbalciold/RepTemplates/pubmed/data/PathologyTurkeyMeSH.csv \n" -->
<!-- ) -->
<!-- Sys.sleep(1) -->
<!-- repeat { -->
<!-- Sys.sleep(0.1) -->
<!-- if (rstudioapi::terminalBusy(myTerm) == FALSE) { -->
<!-- print("Code Executed") -->
<!-- break -->
<!-- } -->
<!-- } -->
<!-- ``` -->
<!-- Keywords are extracted from `xml`. -->
<!-- ```{r extract author keywords from xml, message=FALSE, warning=FALSE, results='asis'} -->
<!-- myTerm <- rstudioapi::terminalCreate(show = FALSE) -->
<!-- rstudioapi::terminalSend( -->
<!-- myTerm, -->
<!-- "xtract -input /Users/serdarbalciold/RepTemplates/pubmed/data/PathologyTurkey.xml -pattern Keyword -element Keyword | sort-uniq-count-rank > /Users/serdarbalciold/RepTemplates/pubmed/data/authorkeywords.csv \n" -->
<!-- ) -->
<!-- Sys.sleep(1) -->
<!-- repeat { -->
<!-- Sys.sleep(0.1) -->
<!-- if (rstudioapi::terminalBusy(myTerm) == FALSE) { -->
<!-- print("Code Executed") -->
<!-- break -->
<!-- } -->
<!-- } -->
<!-- ``` -->
<!-- The retrieved information was compiled in a table. -->
<!-- ```{r message=FALSE, warning=FALSE} -->
<!-- library(readr) -->
<!-- authorkeywords <- read_table2("/Users/serdarbalciold/RepTemplates/pubmed/data/authorkeywords.csv", col_names = c("frequency", "author key word"), cols( -->
<!-- frequency = col_integer(), -->
<!-- `author key word` = col_character() -->
<!-- ), guess_max = 100) -->
<!-- authorkeywords <- authorkeywords %>% -->
<!-- head(n=20) -->
<!-- PathologyTurkeyMeSH <- read_table2("/Users/serdarbalciold/RepTemplates/pubmed/data/PathologyTurkeyMeSH.csv", col_names = c("frequency", "MeSH term"), cols( -->
<!-- frequency = col_integer(), -->
<!-- `MeSH term` = col_character() -->
<!-- ), guess_max = 100) -->
<!-- PathologyTurkeyMeSH <-PathologyTurkeyMeSH %>% -->
<!-- head(n = 20) -->
<!-- ``` -->
<!-- # Results -->
<!-- _**Most common 20 author supplied keywords are given below.**_ -->
<!-- ```{r results = 'asis'} -->
<!-- print(authorkeywords) -->
<!-- # pander::pander(authorkeywords, justify = "left", caption = "Most common 20 author supplied keywords") -->
<!-- ``` -->
<!-- _**Most common 20 MeSH terms are given below**_ -->
<!-- ```{r results = 'asis'} -->
<!-- # pander::pander(PathologyTurkeyMeSH, justify = "left", caption = "Most common 20 MeSH terms") -->
<!-- print(PathologyTurkeyMeSH) -->
<!-- ``` -->
<!-- # Comments -->
<!-- **Comment:** -->
<!-- We may conclude that adenocarcinomas, breast and thyroid tumors, and immunohistochemistry are the most common research topics. Lung, kidney and ovary are also common research topics. -->
<!-- **Future Work:** -->
<!-- * The changes in frequencies of topics throughout time -->
<!-- * The distribution of topics among institutions -->
<!-- --- -->
<!-- # Feedback -->
<!-- [Serdar Balcı, MD, Pathologist](https://github.com/sbalci) would like to hear your feedback: https://goo.gl/forms/YjGZ5DHgtPlR1RnB3 -->
<!-- This document will be continiously updated and the last update was on `r Sys.time()`. -->
<!-- --- -->
<!-- # Back to Main Menu -->
<!-- [Main Page for Bibliographic Analysis](https://sbalci.github.io/pubmed/BibliographicStudies.html) -->