-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Report.Rmd
437 lines (246 loc) · 8.62 KB
/
Report.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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
---
title: "Histopathology Research Template"
description: |
Codes Used in Histopathology Research
Data Report for Histopathology Research
Example Using Random Generated Fakedata
author:
- name: Serdar Balci, MD, Pathologist
url: https://sbalci.github.io/histopathology-template/
affiliation: serdarbalci.com
affiliation_url: https://www.serdarbalci.com/
date: "`r Sys.Date()`"
mail: drserdarbalci@gmail.com
linkedin: "serdar-balci-md-pathologist"
twitter: "serdarbalci"
github: "sbalci"
home: "https://www.serdarbalci.com/"
header-includes:
- \usepackage{pdflscape}
- \newcommand{\blandscape}{\begin{landscape}}
- \newcommand{\elandscape}{\end{landscape}}
- \usepackage{xcolor}
- \usepackage{afterpage}
- \renewcommand{\linethickness}{0.05em}
- \usepackage{booktabs}
- \usepackage{sectsty} \allsectionsfont{\nohang\centering \emph}
- \usepackage{float}
- \usepackage{svg}
always_allow_html: yes
output:
html_document:
toc: yes
toc_float: yes
number_sections: yes
fig_caption: yes
keep_md: yes
highlight: kate
theme: readable
code_folding: "hide"
includes:
after_body: _footer.html
css: css/style.css
prettydoc::html_pretty:
theme: leonids
highlight: vignette
toc: true
number_sections: yes
css: css/style.css
includes:
after_body: _footer.html
rmarkdown::html_vignette:
css:
- !expr system.file("rmarkdown/templates/html_vignette/resources/vignette.css", package = "rmarkdown")
redoc::redoc:
highlight_outputs: TRUE
margins: 1
line_numbers: FALSE
distill::distill_article:
toc: true
pdf_document:
fig_caption: yes
highlight: kate
number_sections: yes
toc: yes
latex_engine: lualatex
toc_depth: 5
keep_tex: yes
includes:
in_header: highlight_echo.tex
vignette: >
%\VignetteIndexEntry{Histopathology Research Template}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
bibliography: bib/template.bib
---
```{r pacman, message=FALSE, warning=FALSE, include=FALSE}
# installing necessary packages
if (requireNamespace("magrittr", quietly = TRUE)) {
`%>%` <- magrittr::`%>%`
}
if (!require("remotes")) install.packages("remotes")
if (!require("pacman")) install.packages("pacman")
if (!require("pak")) install.packages("pak")
if (!require("here")) install.packages("here")
```
<style type="text/css">
h1{
text-align: center;
}
h2{
text-align: center;
}
h3{
text-align: center;
}
h4{
text-align: center;
}
h4.date{
text-align: center;
}
</style>
<!-- Open all links in new tab-->
<base target="_blank"/>
```{r run all Rmd without knit, eval=FALSE, include=FALSE}
source_rmd <- function(rmd_file){
knitr::knit(rmd_file, output = tempfile(), envir = globalenv())
}
list_of_Rmd <- list.files(path = here::here("childRmd"), pattern = "Rmd")
list_of_Rmd <- list_of_Rmd[!list_of_Rmd %in% c("_19shinySurvival.Rmd")]
purrr::map(.x = here::here("childRmd", list_of_Rmd), .f = source_rmd)
```
---
$[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3635430.svg)](https://doi.org/10.5281/zenodo.3635430)$
https://doi.org/10.5281/zenodo.3635430
https://osf.io/3tjfk/
[Histopathology Research Template 🔬](https://sbalci.github.io/histopathology-template/)
---
# Introduction
- **State the marker of interest, the study objectives, and hypotheses [@Knijn2015]**.^[From Table 1: Proposed items for reporting histopathology studies. Recommendations for reporting histopathology studies: a proposal Virchows Arch (2015) 466:611–615 DOI 10.1007/s00428-015-1762-3 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4460276/]
# Materials & Methods
**Describe Materials and Methods as highlighted in [@Knijn2015]**.^[From Table 1: Proposed items for reporting histopathology studies. Recommendations for reporting histopathology studies: a proposal Virchows Arch (2015) 466:611–615 DOI 10.1007/s00428-015-1762-3 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4460276/]
- Describe patient characteristics, and inclusion and exclusion criteria
- Describe treatment details
- Describe the type of material used
- Specify how expression of the biomarker was assessed
- Describe the number of independent (blinded) scorers and how they scored
- State the method of case selection, study design, origin of the cases, and time frame
- Describe the end of the follow-up period and median follow-up time
- Define all clinical endpoints examined
- Specify all applied statistical methods
- Describe how interactions with other clinical/pathological factors were analyzed
---
## Statistical Methods
----
## Header Codes
```{r header, child = here::here('childRmd', '_01header.Rmd')}
```
---
## Generate Fake Data
```{r generate fake data, child = here::here('childRmd', '_02fakeData.Rmd')}
```
---
## Import Data
```{r importData, child = here::here('childRmd', '_03importData.Rmd')}
```
---
## Study Population
```{r brief summary, child = here::here('childRmd', '_04briefSummary.Rmd')}
```
---
## Ethics and IRB
```{r ethics, child = here::here('childRmd', '_05ethics.Rmd')}
```
---
## Define Variable Types
```{r variable types, child = here::here('childRmd', '_06variableTypes.Rmd')}
```
---
## Overview the Data
```{r overview, child = here::here('childRmd', '_07overView.Rmd')}
```
---
# Statistical Analysis
**Learn these tests as highlighted in [@Schmidt2017].**^[Statistical Literacy Among Academic Pathologists: A Survey Study to Gauge Knowledge of Frequently Used Statistical Tests Among Trainees and Faculty. Archives of Pathology & Laboratory Medicine: February 2017, Vol. 141, No. 2, pp. 279-287. https://doi.org/10.5858/arpa.2016-0200-OA]
---
# Results
**Write results as described in [@Knijn2015]**^[From Table 1: Proposed items for reporting histopathology studies. Recommendations for reporting histopathology studies: a proposal Virchows Arch (2015) 466:611–615 DOI 10.1007/s00428-015-1762-3 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4460276/]
- Describe the number of patients included in the analysis and reason for dropout
- Report patient/disease characteristics (including the biomarker of interest) with the number of missing values
- Describe the interaction of the biomarker of interest with established prognostic variables
- Include at least 90 % of initial cases included in univariate and multivariate analyses
- Report the estimated effect (relative risk/odds ratio, confidence interval, and p value) in univariate analysis
- Report the estimated effect (hazard rate/odds ratio, confidence interval, and p value) in multivariate analysis
- Report the estimated effects (hazard ratio/odds ratio, confidence interval, and p value) of other prognostic factors included in multivariate analysis
---
## Data Dictionary
```{r data dictionary, child = here::here('childRmd', '_08dataDictionary.Rmd')}
```
---
## Clean and Recode Data
```{r clean and recode, child = here::here('childRmd', '_09cleanRecode.Rmd')}
```
---
## Impute Missing Data
```{r impute, child = here::here('childRmd', '_10impute.Rmd')}
```
---
\pagebreak
## Descriptive Statistics
```{r descriptives, child = here::here('childRmd', '_11descriptives.Rmd')}
```
---
\newpage
\blandscape
```{r crossTables, child = here::here('childRmd', '_12crossTables.Rmd')}
```
\elandscape
```{r plots, child = here::here('childRmd', '_13plots.Rmd')}
```
```{r pairedTests, child = here::here('childRmd', '_14pairedTests.Rmd')}
```
```{r hypothesisTests, child = here::here('childRmd', '_15hypothesisTests.Rmd')}
```
\newpage
\blandscape
```{r ROC, child = here::here('childRmd', '_16ROC.Rmd')}
```
```{r Decision Tree, child = here::here('childRmd', '_17decisionTree.Rmd')}
```
## Survival Analysis
```{r survival, child = here::here('childRmd', '_18survival.Rmd')}
```
---
# Interactive Survival Analysis
```{r shiny survival, child = here::here('childRmd', '_19shinySurvival.Rmd')}
```
---
\elandscape
# Correlation
```{r correlation, child = here::here('childRmd', '_20correlation.Rmd')}
```
# Models
```{r models, child = here::here('childRmd', '_21models.Rmd')}
```
---
\pagebreak
```{r comments, child = here::here('childRmd', '_22comments.Rmd')}
```
---
\pagebreak
# Discussion
- Interpret the results in context of the working hypothesis elaborated in the introduction and other relevant studies; include a discussion of limitations of the study.
- Discuss potential clinical applications and implications for future research
\pagebreak
# Footer
```{r footer, child = here::here('childRmd', '_23footer.Rmd')}
```
---
\pagebreak
**push all changes to GitHub repository**
```{r git update}
source(file = here::here("R", "force_git.R"))
```
---
# References