Abstract
When reporting research findings, scientists document the steps they followed so that others can verify and build upon the research. When those steps have been described in sufficient detail that others can retrace the steps and obtain similar results, the research is said to be reproducible. Computers play a vital role in many research disciplines and present both opportunities and challenges for reproducibility. Computers can be programmed to execute analysis tasks, and those programs can be repeated and shared with others. Due to the deterministic nature of most computer programs, the same analysis tasks, applied to the same data, will often produce the same outputs. However, in practice, computational findings often cannot be reproduced due to complexities in how software is packaged, installed, and executed—and due to limitations in how scientists document analysis steps. Many tools and techniques are available to help overcome these challenges. Here we describe seven such strategies. With a broad scientific audience in mind, we describe strengths and limitations of each approach, as well as circumstances under which each might be applied. No single strategy is sufficient for every scenario; thus we emphasize that it is often useful to combine approaches.
Introduction
When reporting research, scientists document the steps they followed to obtain their results. If the description is comprehensive enough that they and others can repeat the procedures and obtain semantically consistent results, the findings are considered to be “reproducible”1–6. Reproducible research forms the basic building blocks of science, insofar as it allows researchers to verify and build on each other’s work with confidence.
Computers play an increasingly important role in many scientific disciplines7–10. For example, in the United Kingdom, 92% of academic scientists use some type of software in their research, and 69% of scientists say their research is feasible only with software tools11. Thus efforts to increase scientific reproducibility should consider the ubiquity of computers in research.
Computers present both opportunities and challenges for scientific reproducibility. On one hand, due to the deterministic nature of most computer programs, many computational analyses can be performed such that others can obtain exactly identical results when applied to the same input data12. Accordingly, computational research can be held to a high reproducibility standard. On the other hand, even when no technical barrier prevents reproducibility, scientists often cannot reproduce computational findings due to complexities in how software is packaged, installed, and executed—and due to limitations in how scientists document these steps13. This problem is acute in many disciplines, including genomics, signal processing, and ecological modeling14–16, where data sets are large and computational tools are evolving rapidly. However, the same problem can affect any scientific discipline that requires computers for research. Seemingly minor differences in computational approaches can have major influences on analytical outputs12,17–21, and the effects of these differences may exceed those that result from experimental factors22.
Journal editors, funding agencies, governmental institutions, and individual scientists have increasingly made calls for the scientific community to embrace practices that support computational reproducibility23–30. This movement has been motivated, in part, by scientists’ failed efforts to reproduce previously published analyses. For example, Ioannidis, et al. evaluated 18 published research studies that used computational methods to evaluate gene-expression data but were able to reproduce only 2 of those studies31. In many cases, a failure to share the study’s data was the culprit; however, incomplete descriptions of software-based analyses were also common. Nekrutenko and Taylor examined 50 papers that analyzed next-generation sequencing data and observed that fewer than half provided any details about software versions or parameters32. Recreating analyses that lack such details can require hundreds of hours of effort33 and may be impossible, even after consulting the original authors. Failure to reproduce research may also lead to careerist effects, including retractions34.
Noting such concerns, some journals have emphasized the value of placing computer source code in open-access repositories, such as GitHub (https://github.com) or BitBucket (https://bitbucket.org). In addition, journals have extended requirements for “Methods” sections, now asking researchers to provide detailed descriptions of 1) how to install software and its dependencies and 2) what parameters and data-preprocessing steps are used in analyses10,23. A recent Institute of Medicine report emphasized that, in addition to computer code and research data, “fully specified computational procedures” should be made available to the scientific community24. They elaborated that such procedures should include “all of the steps of computational analysis” and that “all aspects of the analysis need to be transparently reported”24. Such policies represent important progress. However, it is ultimately the responsibility of individual scientists to ensure that others can verify and build upon their analyses.
Describing a computational analysis sufficiently—such that others can reexecute it, validate it, and refine it—requires more than simply stating what software was used, what commands were executed, and where to find the source code13,26,35–37. Software is executed within the context of an operating system (for example, Windows, Mac OS, or Linux), which enables the software to interface with computer hardware (Figure 1). In addition, most software relies on a hierarchy of software dependencies, which perform complementary functions and must be installed alongside the main software tool. One version of a given software tool or dependency may behave differently or have a different interface than another version of the same software. In addition, most analytical software offers a range of parameters (or settings) that the user can specify. If any of these variables differs from what the original experimenter used, the software may not execute properly or analytical outputs may differ considerably from what the original experimenter observed.
Scientists can use various tools and techniques to overcome these challenges and to increase the likelihood that their computational analyses will be reproducible. These techniques range in complexity from simple (e.g., providing written documentation) to advanced (e.g., providing a “virtual” environment that includes an operating system and all software necessary to execute the analysis). This review describes seven strategies across this spectrum. We describe strengths and limitations of each approach, as well as circumstances under which each might be applied. No single strategy will be sufficient for every scenario; therefore, in many cases, it will be most practical to combine multiple approaches. This review focuses primarily on the computational aspects of reproducibility. The related topics of empirical reproducibility, statistical reproducibility, and data sharing have been described elsewhere38–44. We believe that with greater awareness and understanding of computational-reproducibility techniques, scientists—including those with limited computational experience—will be more apt to perform computational research in a reproducible manner.
Narrative descriptions are a simple but valuable way to support computational reproducibility
The most fundamental strategy for enabling others to reproduce a computational analysis is to provide a detailed, written description of the process. For example, when reporting computational results in a research article, authors customarily provide a narrative that describes the software they used and the analytical steps they followed. Such narratives can be invaluable in enabling others to evaluate the scientific approach and to reproduce the findings. In many situations—for example, when software execution requires user interaction or when proprietary software is used—narratives are the only feasible option for documenting such steps. However, even when a computational analysis uses open-source software and can be fully automated, narratives help others understand how to reexecute an analysis.
Although most research articles that use computational methods provide some type of narrative, these descriptions often lack sufficient detail to enable others to retrace those steps 31,32. Narrative descriptions should indicate the operating system(s), software dependencies, and analytical software that were used and how to obtain them. In addition, narratives should indicate the exact software versions used, the order in which they were executed, and all non-default parameters that were specified. Such descriptions should account for the fact that computer configurations differ vastly, even for computers that use the same operating system. Because it can be difficult for scientists to remember such details after the fact, it is best to record this information throughout the research process, rather than at the time of manuscript preparation8.
The following sections describe techniques for automating computational analyses. These techniques can diminish the need for scientists to write narratives. However, because it is often impractical to automate all computational steps, we expect that, for the foreseeable future, narratives will play a vital role in enabling computational reproducibility.
Custom scripts and code can automate a research analysis
Scientific software can often be executed in an automated manner via text-based commands. Using such commands—via a command-line interface—scientists can indicate which software program(s) should be executed and which parameter(s) should be used. When multiple commands must be executed, they can be compiled into scripts, which specify the order in which the commands should be executed (Figure 2). In many cases, scripts also include commands for installing and configuring software. Such scripts serve as valuable documentation not only for individuals who wish to reexecute the analysis but also for the researcher who performed the original analysis45. In these cases, no amount of narrative is an adequate substitute for providing the actual commands that were used.
When writing command-line scripts, it is essential to explicitly document any software dependencies and input data that are required for each step in the analysis. The Make utility46 provides one way to specify such requirements35. Before any command is executed, Make verifies that each documented dependency is available. Accordingly, researchers can use Make files (scripts) to specify a full hierarchy of operating-system components and dependent software that must be present to perform the analysis (Figure 3). In addition, Make can be configured to automatically identify any commands that can be executed in parallel, potentially reducing the amount of time required to execute the analysis. Although Make was designed originally for UNIX-based operating systems (such as Mac OS or Linux), similar utilities have since been developed for Windows operating systems47. Box 1 lists various utilities that can be used to automate software execution.
Box 1: Utilities that can be that can be used to automate software execution
GNU Make46 and Make for Windows47: Tools for building software from source files and for ensuring that the softwares dependencies are met.
Snakemake48 = An extension of Make that provides a more flexible syntax and makes it easier to execute tasks in parallel.
BPipe49 = A tool that provides a flexible syntax for users to specify commands to be executed; it maintains an audit trail of all commands that have been executed.
GNU Parallel50 = A tool for executing commands in parallel across one or more computers.
Makeflow51 = A tool that can execute commands simultaneously on various types of computer architectures, including computer clusters and cloud environments.
SCONS52 = An alternative to GNU Make that enables users to customize the process of building and executing software using scripts written in the Python programming language.
CMAKE53 = A tool that enables users to execute Make scripts more easily on multiple operating systems.
In addition to creating scripts that execute existing software, many researchers also create new software by writing computer code in a programming language such as Python, C++, Java, or R. Such code may perform relatively simple tasks, such as reformatting data files or invoking third-party software. In other cases, computer code may constitute a manuscripts key intellectual contribution.
Whether analysis steps are encoded in scripts or as computer code, scientists can support reproducibility by publishing these artefacts alongside research papers. By doing so, the authors enable readers to evaluate the analytical approach in full detail and to extend the analysis more readily54. Although scripts and code may be included alongside a manuscript as supplementary material, a better alternative is to store them in a version-control system (VCS)8,9,45 and to share these repositories via Web-based services like GitHub (https://github.com) or Bitbucket (https://bitbucket.org). With such a VCS repository, scientists can track different versions of scripts and code that have been developed as the research project evolved. In addition, outside observers can see the full version history, contribute revisions to the code, and reuse the code for their own purposes55. When submitting a manuscript, the authors may “tag” a specific version of the repository that was used for the final analysis described in the manuscript.
Software frameworks enable easier handling of software dependencies
Virtually all computer scripts and code rely on external software dependencies and operating-system components. For example, suppose that a research study required a scientist to apply Student’s t-test. Rather than write code that implements this statistical test, the scientist would likely find an existing software library that implements the test and then invoke that library from her code. A considerable amount of time can be saved with this approach, and a wide range of software libraries are freely available. However, software libraries change frequently—invoking the wrong version of a library may result in an error or an unexpected output. Thus to enable others to reproduce an analysis, it is critical to indicate which dependencies (and versions thereof) must be installed.
One way to address this challenge is to build on a preexisting software framework. Such frameworks make it easier to access software libraries that are commonly used to perform specific types of analysis task. Typically, such frameworks also make it easier to download and install software dependencies and ensure that the versions of software libraries and their dependencies are compatible with each other. For example, Bioconductor56, created for the R statistical programming language57, is a popular framework that contains hundreds of software packages for analyzing genomic data56. The Bioconductor framework facilitates versioning, documenting, and distributing code. Once a software library has been incorporated into Bioconductor, other researchers can find, download, install, and configure it on most operating systems with relative ease. In addition, Bioconductor installs software dependencies automatically. These features ease the process of performing a bioinformatic analysis and enabling other scientists to reproduce the work. Various software frameworks exist for other scientific disciplines58–63. General-purpose tools for managing software dependencies also exist (e.g., Apache Ivy64 and Puppet65).
Literate programming combines narratives directly with code
Although narratives, scripts, and computer code support reproducibility individually, additional value can be gained from combining these entities. Even though a researcher may provide computer code alongside a research paper, other scientists may have difficulty interpreting how the code accomplishes specific tasks. A longstanding way to address this problem is via code comments, which are human-readable annotations interspersed throughout computer code. However, code comments and other types of documentation often become outdated as code evolves throughout the analysis process66. One way to overcome this problem is to use a technique called literate programming67. With this approach, the scientist writes a narrative of the scientific analysis and intermingles code directly within the narrative. As the code is executed, a document is generated that includes the code, narratives, and any outputs (e.g., figures, tables) that the code produces. Accordingly, literate programming helps ensure that readers understand exactly how a particular research result was obtained. In addition, this approach motivates the scientist to keep the target audience in mind when performing a computational analysis, rather than simply to write code that a computer can parse67. Consequently, by reducing barriers of understanding among scientists, literate programming can help to engender greater trust in computational findings.
One popular literate-programming tool is Jupyter68. Using its Web-based interface, scientists can create interactive “notebooks” that combine code, data, mathematical equations, plots, and rich media69. Originally known as IPython and previously designed exclusively for the Python programming language, Jupyter70 now makes it possible to execute code in many different programming languages. Such functionality may be important to scientists who prefer to combine the strengths of different programming languages.
knitr71 has also gained considerable popularity as a literate-programming tool. It is written in the R programming language and thus can be integrated seamlessly with the array of statistical and plotting tools available in that environment. However, like Jupyter, knitr can execute code written in multiple programming languages. Commonly, knitr is applied to documents that have been authored using RStudio72, an open-source tool with advanced editing and package-management features.
Jupyter notebooks and knitr reports can be saved in various output formats, including HTML and PDF (see examples in Figures 4–5). Increasingly, scientists include such documents with journal manuscripts as supplementary material, enabling others to repeat analysis steps and recreate manuscript figures73–76.
Scientists typically use literate-programming tools for data analysis tasks that can be executed in a modest amount of time (e.g., minutes or hours). It is possible to execute Jupyter or knitr at the command line; thus longer-running tasks can be executed on high-performance computers. However, this approach runs counter to the interactive nature of notebooks and require additional technical expertise to configure and execute the notebooks.
Literate-programming notebooks are suitable for research analyses that require a modest amount of computer code. For analyses that require larger amounts of code, more advanced programming environments may be more suitable—perhaps in combination with a “literate documentation” tool such as Dexy (http://www.dexy.it).
Workflow-management systems enable software execution via a graphical user interface
Writing computer scripts and code may seem daunting to many researchers. Although various courses and tutorials are helping to make this task less formidable77–80, many scientists use “workflow management systems” to facilitate the process of executing scientific software81. Typically managed via a graphical user interface, workflow management systems enable scientists to upload data and process it using existing tools. For multistep analyses, the output from one tool can be used as input to additional tools, potentially resulting in a series of commands known as a workflow.
Galaxy82,83 has gained considerable popularity within the bioinformatics community— especially for performing next-generation sequencing analysis. As users construct workflows, Galaxy provides descriptions of how software parameters should be used, examples of how input files should be formatted, and links to relevant discussion forums. To help with processing large data sets and computationally complex algorithms, Galaxy also provides an option to execute workflows on cloud-computing services84. In addition, researchers can share workflows with each other85; this feature has enabled the Galaxy team to build a community that helps to encourage reproducibility, define best practices, and reduce the time required for novices to get started.
Various other workflow systems are freely available to the research community (see Box 2). For example, VisTrails is used by researchers from many disciplines, including climate science, microbial ecology, and quantum mechanics86. It enables scientists to design workflows visually, connecting data inputs with analytical modules and the resulting outputs. In addition, VisTrails tracks a full history of how each workflow was created. This capability, referred to as “retrospective provenance”, makes it possible for others not only to reproduce the final version of an analysis but also to examine previous incarnations of the workflow and examine how each change influenced the analytical outputs87.
Box 2: Workflow management tools freely available to the research community
Galaxy82,83 – https://usegalaxy.org
VisTrails86 – https://www.vistrails.org
Kepler88 – https://kepler-project.org
iPlant Collaborative89 – https://www.iplantcollaborative.org
GenePattern90,91 – http://www.broadinstitute.org/cancer/software/genepattern
Taverna92 – https://www.taverna.org.uk
LONI Pipeline93 – https://pipeline.bmap.ucla.edu
Although workflow-management systems offer many advantages, users must accept tradeoffs. For example, although the teams that develop these tools often provide public servers where users can execute workflows, many scientists share these limited resources, so the public servers may not have adequate computational power or storage space to execute large-scale analyses in a timely manner. As an alternative, many scientists install these systems on their own computers; however, configuring and supporting them requires time and expertise. In addition, if a workflow tool does not yet provide a module to support a given analysis, the scientist must create a new module to support it. This task constitutes additional overhead; however, utilities such as the Galaxy Tool Shed94 are helping to facilitate this process.
Virtual machines encapsulate an entire operating system and software dependencies
Whether an analysis is executed at the command line, within a literate-programming notebook, or via a workflow-management system, an operating system and relevant software dependencies must be installed before the analysis can be performed. The process of identifying, installing, and configuring such dependencies consumes a considerable amount of scientists’ time. Different operating systems (and versions thereof) may require different installation and configuration steps. Furthermore, earlier versions of software dependencies, which may currently be installed on a given computer, may be incompatible with—or produce different outputs than—newer versions.
One solution is to use virtual machines, which can encapsulate an entire operating system and all software, scripts, code, and data necessary to execute a computational analysis95,96 (Figure 6). Using virtualization software—such as VirtualBox or VMWare (see Box 3)—a virtual machine can be executed on practically any desktop, laptop, or server, irrespective of the main (“host”) operating system on the computer. For example, even though a scientist’s computer may be running a Windows operating system, the scientist may perform an analysis on a Linux operating system that is running concurrently—within a virtual machine—on the same computer. The scientist has full control over the virtual (“guest”) operating system and thus can install software and modify configuration settings as necessary. In addition, a virtual machine can be constrained to use specific amounts of computational resources (e.g., computer memory, processing power), thus enabling system administrators to ensure that multiple virtual machines can be executed simultaneously on the same computer without impacting each other’s performance. After executing an analysis, the scientist can export the entire virtual machine to a single, binary file. Other scientists can then use this file to reconstitute the same computational environment that was used for the original analysis. With a few exceptions (see Discussion), these scientists will obtain exactly the same results that the original scientist obtained. This process provides the added benefits that 1) the scientist must only document the installation and configuration steps for a single operating system, 2) other scientists need only install the virtualization software and not individual software components, and 3) analyses can be reexecuted indefinitely, so long as the virtualization software remains compatible with current computer systems97. Also useful, a team of scientists can employ virtual machines to ensure that each team member has the same computational environment, even though the team members may have different configurations on their host operating systems.
One criticism of using virtual machines to support computational reproducibility is that virtual-machine files are large (typically multiple gigabytes), especially if they include raw data files. This imposes a barrier for researchers to share virtual machines with the research community. One option is to use cloud-computing services (see Box 4). Scientists can execute an analysis in the cloud, take a “snapshot” of their virtual machine, and share it with others in that environment95,98. Cloud-based services typically provide repositories where virtual-machine files can be stored and shared easily among users. Despite these advantages, some researchers may prefer that their data reside on local computers, rather than in the cloud—at least while the research is being performed. In addition, cloud-based services may use proprietary software, so virtual machines may only be executable within each provider’s infrastructure. Furthermore, to use a cloud-service provider, scientists may need to activate a fee-based account.
Another criticism of using virtual machines to support computational reproducibility is that the software and scripts used in the analysis will be less easily accessible to other scientists—details of the analysis are effectively concealed behind a “black box”99. Although other researchers may be able to reexecute the analysis within the virtual machine, it may be more difficult for them to understand and extend the analysis99. This problem can be ameliorated when all narratives, scripts, and code are stored in public repositories— separately from the virtual machine—and then imported when the analysis is executed100. Another solution is to use a prepackaged virtual machine, such as Cloud BioLinux, that contains a variety of software tools commonly used within a given research community101.
Scientists can automate the process of building and configuring virtual machines using tools such as Vagrant or Vortex (see Box 3). For either tool, users can write text-based configuration files that provide instructions for building virtual machines and allocating computational resources to them. In addition, these configuration files can be used to specify analysis steps100. Because these files are text based and relatively small (usually a few kilobytes), scientists can share them easily and track different versions of the files via source-control repositories. This approach also mitigates problems that might arise during the analysis stage. For example, even when a computer’s host operating system must be reinstalled due to a computer hardware failure, the virtual machine can be recreated with relative ease.
Box 3: Virtual-machine software
Virtualization hypervisors:
VirtualBox (open source) – https://www.virtualbox.org
Xen (open source) – https://www.xenproject.org
VMWare (partially open source) – https://www.vmware.com
Virtual-machine management tools:
Vagrant (open source) – https://www.vagrantup.com
Vortex (open source) – https://github.com/websecurify/node-vortex
Box 4: Commercial cloud-service providers
Amazon Web Services – https://aws.amazon.com
Rackspace Cloud – https://www.rackspace.com/cloud
Google Cloud Platform – https://cloud.google.com/compute
Windows Azure – https://azure.microsoft.com
Software containers ease the process of installing and configuring dependencies
Software containers are a lighter-weight alternative to virtual machines. Like virtual machines, containers can encapsulate operating-system components, scripts, code, and data into a single package that can be shared with others. Thus, as with virtual machines, analyses executed within a software container should produce identical outputs, irrespective of the underlying operating system or whatever software may be installed outside the container (see Discussion for caveats). As is true for virtual machines, multiple containers can be executed simultaneously on a single computer, and each container may contain different software versions and configurations. However, whereas virtual machines include an entire operating system, software containers interface directly with the computers main operating system and extend it as needed (Figure 3). This design provides less flexibility than virtual machines because containers are specific to a given type of operating system; however, containers require considerably less computational overhead than virtual machines and can be initialized much more quickly102.
The open-source Docker utility103—which has gained popularity among informaticians since its release in 2013—provides the ability to build, execute, and share software containers for Linux-based operating systems. Users specify a Docker container’s contents using text-based commands. These instructions can be placed in a “Dockerfile,” which other scientists can use to rebuild the container. As with virtual-machine configuration files, Dockerfiles are text based, so they can be shared easily and can be tracked and versioned in source-control repositories. Once a Docker container has been built, its contents can be exported to a binary file; these files are generally smaller than virtual-machine files, so they can be shared more easily—for example, via DockerHub104.
A key feature of Docker containers is that their contents can be stacked in distinct layers (or “images”). Each image includes software component(s) that address a particular need (see Figure 7 for an example). Within a given research lab, scientists might create general-purpose images that support functionality for multiple projects, and they might create specialized images that address the needs of specific projects. Docker’s modular design provides the advantage that when images within a container are updated, Docker only needs to track the specific components that have changed; users who wish to update to a newer version must download a relatively small update. In contrast, even a minor change to a virtual machine would require users to export and reshare the entire virtual machine.
Scientists have begun to share Docker images with others who are working in the same subdiscipline. For example, nucleotides is a catalog of genome-assembly tools that have been encapsulated in Docker images105,106. Genome-assembly tools differ considerably in the dependencies that they require and in the parameters that they support. This project provides a means to standardize these assemblers, to circumvent the need to install dependencies for each tool, and to perform benchmarks across the tools. Such projects may help to reduce the reproducibility burden on individual scientists.
The use of Docker containers for reproducible research comes with caveats. Individual containers are stored and executed in isolation from other containers on the same computer; however, because all containers on a given machine share the same operating system, this isolation is not as complete as it is with virtual machines. This means, for example, that a given container is not guaranteed to have access to a specific amount of computer memory or processing power—multiple containers may have to compete for these resources102. In addition, containers may be more vulnerable to security breaches102. Another caveat is that Docker containers can only be executed on Linux-based operating systems. For other operating systems, Docker containers must be executed within a virtual machine (for example, see https://boot2docker.io). Although this configuration offsets some benefits of using containers, combining virtual machines with containers may provide a happy medium for many scientists, allowing them to use a non-Linux host operating system, while receiving the benefits of containers within the guest operating system.
Efforts are ongoing to develop and refine software-container technologies. Box 5 lists various tools that are currently available. In coming years, these technologies promise to play an influential role within the scientific community.
Box 5: Open-source containerization software
Docker – https://www.docker.com
Linux Containers – https://linuxcontainers.org
lmctfy – https://github.com/google/lmctfy
OpenVZ – https://openvz.org
Warden – http://docs.cloudfoundry.org/concepts/architecture/warden.html
Discussion
Scientific advancement requires trust. This review provides a comprehensive, though inexhaustive, list of techniques that can help to engender such trust. Principally, scientists must perform research in such ways that they can trust their own findings3,45. Science philosopher Karl Popper contended that “[w]e do not take even our own observations quite seriously, or accept them as scientific observations, until we have repeated and tested them”2. Indeed, in many cases, the individuals who benefit most from computational reproducibility are those who performed the original analysis. But reproducible practices can also help scientists garner each others trust45,107. When other scientists can reproduce an analysis and determine exactly how its conclusions were drawn, they may be more apt to cite the work and build upon it. In contrast, when others fail to reproduce research findings, it can derail scientific progress and lead to embarrassment, accusations, and retractions.
We have described seven tools and techniques for computational reproducibility. None of these approaches is sufficient for every scenario in isolation. Rather scientists will often find value in combining approaches. For example, a researcher who uses a literate-programming notebook (which combines narratives with code) might incorporate the notebook into a software container so that others can execute it without needing to install specific software dependencies. The container might also include a workflow-management system to ease the process of integrating multiple tools and incorporating best practices for the analysis. This container could be packaged within a virtual machine to ensure that it can be executed on many operating systems (see Figure 8). In determining a reproducibility strategy, scientists must evaluate the tradeoff between robustness and practicality.
The call for computational reproducibility relies on the premise that reproducible science will bolster the efficiency of the overall scientific enterprise108. Although reproducible practices may require additional time and effort, these practices provide ancillary benefits that help offset those expenditures45. Primarily, the scientists who perform a study may experience increased efficiency45. For example, before and after a manuscript is submitted for publication, it faces scrutiny from co-authors and peer reviewers who may suggest alterations to the analysis. Having a complete record of all analysis steps and being able to retrace those steps precisely, makes it faster and easier to implement the requested alterations45,109. Reproducible practices can also improve the efficiency of team science because colleagues can more easily communicate their research protocols and inspect each other’s work; one type of relationship where this is critical is that between academic advisors and mentees109. Finally, when research protocols are shared transparently with the broader community, scientific advancement increases because scientists can learn more easily from each other’s work and duplicate each other’s efforts less frequently109.
Reproducible practices do not necessarily ensure that others can obtain results that are perfectly identical to what the original scientists obtained. Indeed, this objective may be infeasible for some types of computational analysis, including those that use randomization procedures, floating-point operations, or specialized computer hardware96,110. In such cases, the goal may shift to ensuring that others can obtain results that are semantically consistent with the original findings5,6. In addition, in studies where vast computational resources are needed to perform an analysis or where data sets are distributed geographically111–113, full reproducibility may be infeasible. Alternatively, it may be infeasible to reallocate computational resources for analyses that are highly computationally intensive8. In these cases, researchers can provide relatively simple examples that demonstrate the methodology8. When legal restrictions prevent researchers from sharing software or data publicly, or when software is available only via a Web interface, researchers should document the analysis steps as well as possible and describe why such components cannot be shared24.
Computational reproducibility does not guarantee against analytical biases or ensure that software produces scientifically valid results114. As with any research, a poor study design, confounding effects, or improper use of analytical software may plague even the most reproducible analyses114,115. On one hand, increased transparency puts scientists at a greater risk that such problems will be exposed. On the other hand, scientists who are fully transparent about their scientific approach may be more likely to avoid such pitfalls, knowing that they will be more vulnerable to such criticisms. Either way, the scientific community benefits.
Lastly, we emphasize that some reproducibility is better than none. As Voltaire said, the perfect should not be the enemy of the good116. Although some of the practices described in this review require more technical expertise than others, these practices are freely accessible to all scientists and provide long-term benefits to the researcher and to the scientific community. Indeed, as scientists act in good faith to perform these practices, where feasible, the pace of scientific progress will surely increase.
References
References
- 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.↵