What is "reproducible" research?

  • I put it in quotes because it would be better called repeatable or replicable research, but the term that has been generally used reproducible

  • Why make the distinction?

The 4 R's

The 4 R's: repeat, replicate, reproduce, reuse

Is repeatability and replicability worth having?

  • The authors distinctions are correct, but…

  • I disagree with the premise of the paper, i.e., "replicability is not worth having"

  • Instead, I suggest replicability, and especially repeatability of your own results is the foundation of reproducibility

  • Without being able to at least repeat exactly the results of your own analyses or replicate that of another group, why should you trust the results in order so that you can begin to try to reproduce them?

Why is reproducible research needed?

  • Data and their analysis are increasingly complex

  • Analysis is part of the methods!

  • Generally, methods should be reported at the level that another group can replicate the results

  • Many experiments can not be reproduced
    • Most large clinical trials
    • The Large Hadron Collider (Higgs Boson)
  • But replication is at least a step in the right direction

Because IOM says so

  • Evolution of Translational Omics
    • Data & metadata used should be made publicly available
    • The fully-specified computational procedures and exact computer code used for the development of the candidate omics-based test should be made sustainably available
    • "Ideally, the computer code that is released will encompass all the steps of computational analysis, including all data preprocessing steps…. All aspects of the analysis need to transparently reported."

Sounds good, but how?

  • One technique is "literate programming"

  • Concept introduced by Donald Knuth (he's a big deal)

  • Write your reports/articles as a stream of code and text

  • Needs the human/documentation language + a machine/programming language

  • In R, best literate programming environment is R Markdown + R = knitr

  • These slides and all your assignments have been made with knitr (+ a little HTML)!

Markdown

Knitr

  • Knitr provides the way to weave together R code with R Markdown
Two plus two equals `r 2 + 2`

Two plus two equals 4

  • Longer code blocks begin and end with three backticks plus {r}
```{r, <options>}

```

Outputs

  • HTML (web)

  • Microsoft Word

  • PDF (with special tools)

Goal

  • Future homework &
  • Final project

… should be completed with knitr in RStudio