Code Availability
Summary of Policy Requirements for Authors Publishing in PLOS Biology
- Upon publication of your article, you must share publicly any code that you created and that directly relates to the results described in your article, unless you claim an exemption to the policy. Shared code must remain openly available after the initial publication date.
- If you have legal (including contractual) or ethical restrictions on public sharing of your code, please include details of your exemption in your Data Availability Statement and cover letter, and your request will be reviewed by PLOS Biology staff.
- A statement about where and how your code can be accessed must be included in the Data Availability Statement in your manuscript.
- You are responsible for the quality of your code and any accompanying documentation. Peer reviewers can review the code at their discretion.
- This policy applies to all manuscripts submitted to the journal from 1 January 2026.
Code Sharing Policy
We aim to increase the amount of code that is shared with articles published in PLOS Biology because doing so supports open, transparent research. Sharing computer code assists other researchers to assess, reuse and reproduce published work, and is good research practice.
In alignment with our data availability policy, PLOS Biology requires authors to make all author-generated code (including but not limited to data analysis code, software and algorithms) required to replicate their study’s findings publicly available without access restriction at the time of publication unless specific legal or ethical restrictions prohibit public sharing of code. Access to code must be described in the Data Availability Statement. Relevant code should be available to editors and reviewers at the time of submission and throughout the editorial process, but does not need to be publicly shared prior to acceptance.
Please see this section for details of what to share and how to share your code.
Code Sharing Restrictions and Exemptions
This code sharing policy does not overrule contractual obligations, local regulations, legislation or ethical frameworks. Acceptable restrictions on code distribution may include ethical restrictions, legal limitations (such as contractual obligations) and dual use concerns of the code. Any limitations on code sharing must be made clear in both the cover letter submitted with the manuscript and in the Data Availability Statement at the time of submission and will be subject to editorial assessment. Where the code is paramount to the article but cannot be shared, this may be grounds for rejection due to PLOS’ commitment to open science. Please see this section for more information on restrictions and exemptions and what details to provide.
What and How to Share Code - further details
Required code
You must share the author-generated code required to reproduce all of the findings reported in the manuscript, as well as related documentation, regardless of when the code was first written. This includes custom code executed within commercial software packages (e.g., Matlab, SPSS, Office software).
For example, you are required to share the following code:
- Novel, in-house or custom code/scripts written for data processing or analysis
- New computational models and software packages
- Existing software/packages/models, which use a coding language (e.g. Python, R, MATLAB), that are modified by the authors and used to process or analyse data
- New code written for simulations
If you have produced a tool or software you should follow the Software Sharing policy (which is mandatory for software submissions).
If you have used artificial intelligence in your research you must comply with the Artificial Intelligence Tools and Technologies policy.
Additional code
In addition to the required code above, ideally you should share any scripts that reuse existing code packages or software, wherever copyright allows, in order to allow others to see any details specific to your processing or analysis (such as parameters that must be specified). Sharing these scripts allows for greater reproducibility than just citing the packages as it allows readers to understand how the code was implemented (e.g., statistical thresholds). However, if it is unfeasible to share your scripts that reuse existing packages, then the packages should be cited and any variables specified. When sharing this type of code, be sure to reference any existing code you have reused as a software citation and ensure the licenses are compatible.
Documentation
Alongside the code you should also be sharing any annotation and documentation that would be necessary for another researcher to run your code. For example, details of dependencies such as the environment it needs to be run in and the names and version numbers of any packages or software needed.
Location
Shared code needs to be made accessible for free and should be easy to locate and download. We strongly recommend that all code be deposited in a permanent, public repository that issues citable digital object identifiers (DOI) or other persistent identifiers. Where code has been shared in a non-permanent repository, such as Github or Bitbucket, we recommend that a snapshot of the code is archived in a permanent, public repository, for example Zenodo, CodeOcean, or the Software Heritage archive as the journal expects code outputs to remain available after the article is published to support PLOS’ goals of open and transparent research. We encourage authors to link to both the archived snapshot and live versions of the code in their Data Availability Statements.
Licenses
PLOS does not require code to be shared using any specific license, only that a license is clearly specified. However, to support reusability of the code we strongly encourage authors to license code so it conforms with the Open Source Definition. We also encourage authors to use complete open source solutions where possible.
Restrictions and Exemptions - further details
When author-generated code cannot be publicly shared due to ethical restrictions, legal limitations (e.g. contractual obligations) or dual use concerns, PLOS Biology recommends using a controlled access deposit to a repository, such as Zenodo, to facilitate access requests. If this is not possible, authors must identify the contacts to whom requests should be submitted and must include in the Data Availability Statement all necessary contact information where an interested reader would need to apply in order to obtain the code. A third party should be named for distribution of the generated code, such as an institutional access committee. It is not acceptable to only list the authors as contacts for requests for access. Where the code is paramount to the article but cannot be shared, this may be grounds for rejection due to PLOS’ commitment to open science.
Where the data is subject to sensitivity concerns but the code is not, you should provide the code and simulated data that can be used with it.
Refusal to share code, or lack of details of how to request access to the code, in accordance with this policy, may be grounds for rejection. If restrictions on access to code come to light after publication, we reserve the right to take editorial action on the article (e.g., post a correction or editorial expression of concern, or retract the article) as warranted given case-specific details, and/or to contact the authors' institutions and funders.
Any exemptions to code sharing as outlined in this policy must be approved by an Editor, and must be requested at submission.