Repository navigation
Expand file tree
/
Copy pathreport.Rmd
More file actions
177 lines (157 loc) · 6.91 KB
/
Copy pathreport.Rmd
File metadata and controls
177 lines (157 loc) · 6.91 KB
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
---
title: "CLAIM summary"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: pdf_document
classoption: landscape
geometry: margin=2cm
header-includes:
- \usepackage{fancyhdr}
- \usepackage{longtable}
- \usepackage{array}
- \fancyhf{}
- \renewcommand{\headrulewidth}{0pt}
- \fancyfoot[C]{\itshape{This report has been generated using the Checklist for Artificial Intelligence in Medical Imaging (CLAIM) online version (https://claim.shinyapps.io/CLAIM/), adapted from the CLAIM manuscript, which is freely available here https://pubs.rsna.org/doi/10.1148/ryai.2020200029.}}
- \fancyhead[R]{\thepage}
- \pagestyle{fancy}
- \fancypagestyle{plain}{\pagestyle{fancy}}
params:
title: NA
author: NA
email: NA
domain1: NA
domain2: NA
domain3: NA
domain4: NA
domain5: NA
boilers: NA
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(kableExtra)
library(knitr)
library(dplyr)
escapestr <- function(x) {
x <- gsub("\\,", "\\\\,", x)
x <- gsub("\\.", "\\\\.", x)
x <- gsub("\\(", "\\\\(", x)
x <- gsub("\\)", "\\\\)", x)
x <- gsub("\\/", "\\\\/", x)
x <- gsub("\\?", "\\\\?", x)
x <- gsub("\\-", "\\\\-", x)
x <- gsub("\\:", "\\\\:", x)
return(x)
}
```
```{r, echo=FALSE}
ndom <- 5
details <- vector()
for (i in 1:ndom) {
details <- append(details, params[[paste0("domain",i)]])
}
checkIDs <- c("1", "2","3","4",
"5", "6", "7a Data sources", "7b Data ", "7c Code", "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", "35a Performance", "35b Benchmark", "36","37",
"38a Summaries", "38b Limitations", "39",
"40a Data", "40b Analysis", "41", "42"
)
checkitem <- c("Identification as a study of AI methodology.",
"Structured summaries.",
"Scientific and clinical background.",
"Study objectives and hypotheses.",
"Prospective or retrospective study.",
"Study goal.",
"Data sources.",
"Data deposited." ,
"Software/code deposited.",
"Eligibility criteria.",
"Data preprocessing steps.",
"Selection of data subsets, if applicable.",
"Definitions of data elements.",
"De-identification methods.",
"How missing data were handled.",
"Definition of ground truth reference standard.",
"Rationale for choosing the reference standard.",
"Source of ground truth annotations.",
"Annotation tools.",
"Measurement of inter- and intrarater variability.",
"Intended sample size and how it was determined.",
"How data were assigned to partitions.",
"Level at which partitions are disjoint.",
"Detailed description of model.",
"Software libraries, frameworks, and packages.",
"Initialization of model parameters.",
"Details of training approach.",
"Method of selecting the final model.",
"Ensembling techniques, if applicable.",
"Metrics of model performance.",
"Statistical measures of significance.",
"Robustness or sensitivity analysis.",
"Methods for explainability or interpretability.",
"Validation or testing on external data.",
"Flow of participants or cases.",
"Demographic and clinical characteristics for each partition.",
"Performance metrics for optimal model(s) on all data partitions",
"Benchmark performance against current standards.",
"Estimates of diagnostic accuracy and their precision.",
"Failure analysis of incorrectly classified cases.",
"Summary of results.",
"Study limitations.",
"Implications for practice.",
"Registration number and name of registry for study that generated raw data.",
"Registration number and name of registry for reported machine learning study.",
"Where can the full study protocol be accessed.",
"Sources of funding and other support; role of funders."
)
table.df <- data.frame("Item.num"=checkIDs, "Checklist item"=checkitem, "Manuscript details"=details)
```
```{r}
escboil <- escapestr(details)
# Check for matches with boilerplate
boilmatch <- as.logical(sapply(escboil, function(x) {any(grepl(x, params$boilers))}))
```
**Manuscript title:** `r params$title`
**Corresponding Author:** `r params$author`
**Corresponding author email:** `r params$email`
\renewcommand{\arraystretch}{1.5}
```{r}
hdr <- c("Item No.", "Checklist item", "Manuscript Details")
table.df %>%
mutate(
Manuscript.details = cell_spec(Manuscript.details, italic=boilmatch)
) %>%
select(Item.num, Checklist.item, Manuscript.details) %>%
kable(table.df, format="latex", longtable=TRUE, escape=FALSE,
col.names=hdr) %>%
kable_styling(latex_options = c("hold_position"), full_width = FALSE) %>%
row_spec(0, bold=TRUE, font_size = 12) %>%
column_spec(1, border_right=TRUE) %>%
column_spec(2, border_right=TRUE, width="20em") %>%
column_spec(3, width="40em") %>%
pack_rows("TITLE, ABSTRACT, INTRODUCTION (items 1-4)", hline_after = TRUE, 1, 4) %>%
pack_rows("METHODS (items 5-32)", 5, 34, hline_after = TRUE) %>%
pack_rows("RESULTS (items 33-37)", 35, 40, hline_before = TRUE) %>%
pack_rows("DISCUSSION (items 38 and 39)", 41, 43, hline_before = TRUE) %>%
pack_rows("OTHER INFORMATION (items 40-42)", 44, 47, hline_before = TRUE)
# kable(table.df, longtable=TRUE,
# col.names=c("Item #", "Checklist item", "Manuscript Details")) %>%
# kable_styling(latex_options = c("hold_position"), full_width = FALSE) %>%
# row_spec(0, bold=TRUE, font_size = 12) %>%
# column_spec(1, border_right=TRUE) %>%
# column_spec(2, border_right=TRUE, width="20em") %>%
# column_spec(3, width="40em") %>%
# pack_rows("TITLE, ABSTRACT, INTRODUCTION (items 1-4)", hline_after = TRUE, 1, 4) %>%
# pack_rows("METHODS (items 5-32)", 5, 34, hline_after = TRUE) %>%
# pack_rows("RESULTS (items 33-37)", 35, 40, hline_before = TRUE) %>%
# pack_rows("DISCUSSION (items 38 and 39)", 41, 43, hline_before = TRUE) %>%
# pack_rows("OTHER INFORMATION (items 40-42)", 44, 47, hline_before = TRUE)
# pack_rows("Pre-experiment", hline_after = TRUE, 1, 2) %>%
# pack_rows("Control groups", 3, 8, hline_after = TRUE) %>%
# pack_rows("Control measures", 9, 13, hline_before = TRUE) %>%
# pack_rows("Feedback specifications", 14, 18) %>%
# pack_rows("Outcome measures - brain", 19, 21) %>%
# pack_rows("Outcome measures - behaviour", 22, 23) %>%
# pack_rows("Data storage", 24, 24)
```