Skip to content
Docs menu

License, citation and paper version for code

Without a license nobody may reuse your code, and without a tag nobody knows which version matches the paper. Add a license, a citation file and a release.

Last updated

In your report

Area
Execution
Check
Licensing & Citation

Why it matters

Publishing code on GitHub does not by itself allow reuse: without a license, a creative work, code included, is under exclusive copyright by default.

Journals ask for more than a link. PLOS Computational Biology strongly recommends depositing code in a permanent repository that issues DOIs or other persistent identifiers. A tagged release and a citation file make that deposit, and your code availability statement, straightforward.

What good looks like

  • A LICENSE file at the repository root, chosen in line with your institution’s policy, and separate terms for data where they differ.
  • A CITATION.cff with the paper as the preferred citation, so GitHub offers “Cite this repository”.
  • The version used in the paper tagged, archived with a DOI and named in the manuscript.
  • The README opens with the paper reference and a link to it.
  • Third-party code, datasets and pretrained models credited under their own licenses.

How to fix it

Add a citation file. The Citation File Format site has a form that writes one:

CITATION.cff
cff-version: 1.2.0
message: "If you use this code, please cite the paper below."
title: "Code for: <paper title>"
version: "v1.0-paper"
date-released: 2026-09-01
license: MIT
repository-code: "https://github.com/<org>/<repo>"
authors:
  - family-names: "<Family>"
    given-names: "<Given>"
preferred-citation:
  type: article
  title: "<paper title>"
  authors:
    - family-names: "<Family>"
      given-names: "<Given>"
  journal: "<journal>"
  year: 2026
  doi: "<paper DOI>"

Tag the paper version and name the tag in your code availability statement:

bash
git tag -a v1.0-paper -m "Code as submitted with the manuscript"
git push origin v1.0-paper

Archive it. Connected to Zenodo, each GitHub release gets its own DOI. For an R package, usethis::use_mit_license() adds the license file and the DESCRIPTION field.

See this check on your repository

Every analysis reports findings for this check, with file references and suggested fixes.