Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Review
. 2024 Sep 10;22(9):e3002815.
doi: 10.1371/journal.pbio.3002815. eCollection 2024 Sep.

A how-to guide for code sharing in biology

Affiliations
Review

A how-to guide for code sharing in biology

Richard J Abdill et al. PLoS Biol. .

Abstract

In 2024, all biology is computational biology. Computer-aided analysis continues to spread into new fields, becoming more accessible to researchers trained in the wet lab who are eager to take advantage of growing datasets, falling costs, and novel assays that present new opportunities for discovery. It is currently much easier to find guidance for implementing these techniques than for reporting their use, leaving biologists to guess which details and files are relevant. In this essay, we review existing literature on the topic, summarize common tips, and link to additional resources for training. Following this overview, we then provide a set of recommendations for sharing code, with an eye toward guiding those who are comparatively new to applying open science principles to their computational work. Taken together, we provide a guide for biologists who seek to follow code sharing best practices but are unsure where to start.

PubMed Disclaimer

Conflict of interest statement

The authors have declared that no competing interests exist.

Figures

Fig 1
Fig 1. Example code for a reproducible project.
The first lines of a longer analysis script written in Python 3 with examples of practices that make the code easier for other users to understand.

References

    1. Allen C, Mehler DMA. Open science challenges, benefits and tips in early career and beyond. PLoS Biol. 2019;17:e3000246. doi: 10.1371/journal.pbio.3000246 - DOI - PMC - PubMed
    1. McKiernan EC, Bourne PE, Brown CT, Buck S, Kenall A, Lin J, et al.. How open science helps researchers succeed. Elife. 2016;5:e16800. doi: 10.7554/eLife.16800 - DOI - PMC - PubMed
    1. Lewandowsky S, Bishop D. Research integrity: Don’t let transparency damage science. Nature 2016;529:459–461. doi: 10.1038/529459a - DOI - PubMed
    1. Toelch U, Ostwald D. Digital open science-Teaching digital tools for reproducible and transparent research. PLoS Biol. 2018;16:e2006022. doi: 10.1371/journal.pbio.2006022 - DOI - PMC - PubMed
    1. Stodden V, Ferrini V, Gabanyi M, Lehnert K, Morton J, Berman H. Open access to research artifacts: Implementing the next generation data management plan. Proc Assoc Inf Sci Technol. 2019;56:481–485. doi: 10.1002/pra2.51 - DOI

MeSH terms

LinkOut - more resources