-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.Rmd
More file actions
368 lines (212 loc) · 6.74 KB
/
index.Rmd
File metadata and controls
368 lines (212 loc) · 6.74 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
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
---
title: "Prepare your data and your code for manuscript"
author: "inSileco Team"
output:
xaringan::moon_reader:
css: [default, rd.css, rd-font.css, "hygge"]
lib_dir: assets
seal: false
nature:
highlightStyle: dracula
countIncrementalSlides: false
beforeInit: "macros.js"
---
```{r setup, include = FALSE}
source("_setup.R")
htmltools::tagList(
xaringanExtra::use_clipboard(
button_text = "<i class=\"fa fa-clipboard\"></i>",
success_text = "<i class=\"fa fa-check\" style=\"color: #37abc8\"></i>",
),
rmarkdown::html_dependency_font_awesome()
)
xaringanExtra::use_scribble()
```
class: title-slide, middle
## .font140[Data and code ready for your paper]
<br>
.instructors[
<br><br><br>
.font120[.authors140[Kevin, Matt & Chris]]
<br><br>
.font120[`r format(Sys.time(), '%B %d, %Y')`]
<br>
]
<br><br><br><br><br><br>
.font140[[`r gh()` dataReady](https://github.com/McCannLab/dataReady/)]

.instructors[Content under [`r rfa("creative-commons")` `r rfa("creative-commons-zero")`](https://creativecommons.org/licenses/by/4.0/) unless otherwise specified.]
---
class: inverse, center, middle
# Reproducible Research
![:custom_hr]()
## [workshop_reproducibility](https://insilecoinc.github.io/workshop_reproducibility/#1)
---
# Reproducible research (in a nutshell)
--
* Started late 80's
--
* Not that easy to redo the process: **raw data** `r ar()` **results** `r ar()` **paper**
--
* From 80's to 2010's it get worst (due to an increased number of computational operations)
--
* Reproducible research became more important since
---
# Reproducible research (in a nutshell)
> We define **reproducibility** to mean **computational reproducibility**—
obtaining consistent computational results using the same **input data**, computational steps, methods, **code**, and conditions of analysis;
.pull-left[
```{R, echo = FALSE, out.width = "50%", purl = FALSE}
kig("img/cover_rrs.png")
```
]
.pull-right[
`r rfa("file")` National Academies of Sciences, Engineering, and Medicine
(2019). [Reproducibility and Replicability in Science](https://www.nap.edu/catalog/25303/reproducibility-and-replicability-in-science).
]
--
### To do this science need to be **open** at least to some extent: **code** and **data** have to be available.
---
# Reproducible research (in a nutshell)
Make sure that :
* Data are not a well-chosen subset....
* Code can be run not just on your computer...
* Avoid [excel-related error](https://www.nytimes.com/2013/04/19/opinion/krugman-the-excel-depression.html)
* etc.
--
### Preparing data and code for submission is an important part of this!
---
class: inverse, center, middle
# Try to be organized
![:custom_hr]()
---
# One well-structured folder! [Download it](https://github.com/inSilecoInc/workshop_reproducibility/raw/main/demo/min_workflow.zip).
--
.pull-left[
```sh
`r emj("file_folder")`
.
├── data
├── ms
├── output
├── src
└── README.md
```
]
--
.pull-right[
```sh
`r emj("file_folder")`
.
├── data
├── ms
├── output
├── R
└── README.md
```
]
<br>
--
`r rfa("blog")` Rich FitzJohn (2013). [Designing projects](https://nicercode.github.io/blog/2013-04-05-projects/)
---
# One well-structured folder!
- `r emj("file_folder")` `R` : R code (`.R` files)
- functions, scripts ...
- data retrieval, statistical analysis, figure
<br>
--
- `r emj("file_folder")` `data` :
- input/raw data
- processed data
- data may be archived on line (e.g. Dryad) and may be accessed via a script (see [rdryad](https://docs.ropensci.org/rdryad/))
---
# One well-structured folder!
- `r emj("file_folder")` `output` (`fig` / `tab` / `res`):
- figures
- tables
<br>
--
- `r emj("file_folder")` `ms` (`doc`)
- main manuscript
- supplementary information (SI)
---
# Follow 4 simple rules!
## 1. Start off raw data
- avoid editing raw data
- keep scripts that generate (cleaner) intermediate files
- if you create a lot of simulation, keep the scripts that generate the data.
---
# Follow 4 simple rules!
## 2. The folder must be self contained
- think of the root of the folder as the root of the system
- ~~C:\user/data\dat0001.txt~~
- but this system is not isolated (e.g. remote)
- does not mean everything will be shared / added in the research compendium
---
# Follow 4 simple rules!
## 3. document massively
- your datasets (could be a link to relevant documentation)
- your functions and scripts
- and the tricks you've used that won't be clear to others (that includes future yourself!)
- use metadata [EML](https://eml.ecoinformatics.org/)
---
# Follow 4 simple rules!
## 4. Keep track of all versions you've used
- R version (and other software)
- Package versions
<br><br>
.font80[`r fl()` Sandve et al. [Ten Simple Rules for Reproducible Computational
Research](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003285)]
---
# One well-structured folder!
### 1. Submit your ms
### 2. Once your ms is accepted zip the folder without `ms`
### 3. `r ar()` research compendium
--
<br>
```{R, echo = FALSE, out.width = "80%", purl = FALSE}
kig("img/spectrum.png")
```
---
class: inverse, center, middle
# Data & code ready for submission
![:custom_hr]()
---
# What do journals want?
```{R, echo = FALSE, out.width = "50%", purl = FALSE}
kig("img/data_avail.png")
```
.font80[[`r fl()`](https://www.sciencedirect.com/science/article/pii/S0169534715002906) Mislan et al. (2016)]
---
# Data and code availability statements
### Before publication
> Code and data will made (publicly) available upon acceptance.
### After publication
> Code and data are available at the following URL (DOI).
---
# Various options
```{R, echo = FALSE, out.width = "100%", purl = FALSE}
kig("img/repo_table.png")
```
`r fl()` Mislan, K.A.S., Heer, J.M., and White, E.P. (2016). [Elevating The Status of Code in Ecology](https://www.sciencedirect.com/science/article/pii/S0169534715002906). Trends in Ecology & Evolution 31, 4–7.
`r lk()` https://www.nature.com/nature-portfolio/editorial-policies/reporting-standards
---
# Various options
### Document your data
* A simple text
* Using a standard for your metadata ([EML](https://eml.ecoinformatics.org/))
* A data paper
--
### Document your code
* Comments
* Use specific guidelines
* Create a package
---
# Demo/examples
## GitHub + Zenodo
- https://github.com/McCannLab/NDID
- https://github.com/McCannLab/HomogenFishOntario
## GitHub + Zenodo + Dryad
- https://www.mdpi.com/2304-8158/10/4/717
- https://doi.org/10.5061/dryad.95x69p8jd
- https://zenodo.org/record/4602032#.YHY6RyUpCV4