Categories
articles code science

DAFT: minimal principles for reproducible research papers

I would like to share with you a minimal set of principles that I’ve been using to organize my research papers. These principles aren’t new or revolutionary… in fact, they’re basic, even boring. However, they are the ones that stood out to me over the years as the most fundamental; the ones that nudge me in the right direction and foster good scientific practice without overcomplicating.

Principles

I’m calling them the DAFT principles (the reason will be obvious below). There are only three:

  • Use DAFT-numbered directories
  • Follow a self-contained data flow
  • Add one README per subdirectory

These three principles provide an organized structure, a clear workflow, and basic documentation to help research papers be more transparent, understandable, and reproducible.

Structure

DAFT-numbered directories

DAFT stands for Data, Analyses, Figures, and Text. These are the names of the directories that form the backbone of the paper. But their name is prefixed by an incremental sequence of numbers. Here’s how a template of a DAFT paper would look like:

daft-paper/
├── 0-data # raw datasets
├── 1-analyses # scripts and outputs
├── 2-figures # figure plates
├── 3-text # manuscript text
└── README.md

I find the ordered directory structure incredibly helpful to orient myself when entering the paper’s directory. The folders are always in the same position and clearly direct me to where I need to go, whether it is organizing datasets, performing analyses, making figures, or writing text.

  • 0-data/ is where I put the raw data and datasets associated with the paper. The goal is that every observation, analysis, and result is based solely on the files inside this directory—not from elsewhere!
  • 1-analyses/ is where I gather analysis pipelines and their associated files. This includes scripts, output data, plots, logs, and other files that process the raw data into results.
  • 2-figures/ is where I keep the source files that I use to assemble figure plates. Ideally, every panel will come from files inside the data and analyses directories only.
  • 3-text/ is where I keep the source files for the manuscript itself. And, as you might already be guessing by now, the text should only be based on the contents of the data, analyses, and figures directories. See more about the self-contained workflow below.

To organize individual datasets, analyses, and figures, I use subdirectories. Here, I prefer to use a short, descriptive name without a prefix number:

daft-template/
├── 0-data
│   ├── ablation # tissue timelapses
│   ├── confocal # microscopy stacks
│   └── README.md
├── 1-analyses
│   ├── fold-depth # depth measurements
│   ├── germband-speed # speed analysis
│   └── README.md
├── 2-figures
│   ├── background # introductory figure
│   ├── conclusion # summary figure
│   ├── fold-dynamics # main results figure
│   └── README.md
├── 3-text
│   ├── paper.bib # file with references
│   ├── paper.md # manuscript text file
│   └── README.md
└── README.md

Ordered directories ease the burden of finding what I need, even after many months without looking into the paper. They are useful for your future and collaborators over long-term projects, but also for colleagues who might want to check how a specific analysis pipeline was done after publication, which is important for reproducibility.

Workflow

Self-contained data flow

The sequential numbering of the directories also contributes to another essential aspect of DAFT: it makes the direction of the workflow explicit:

dataanalysesfigurestext

The structure exposes the underlying logic of the paper’s organization. With that, we can trace back how a specific result was generated from the original data.

That’s already a big win for reproducibility. However, for this to truly work, every piece of data of the paper needs to be self-contained within the main directory.

  • Every result in 3-text must be derived from the files in 2-figures, 1-analyses, or 0-data;
  • Every panel in 2-figures must be derived from the files in 1-analyses and 0-data;
  • Every result in 1-analysis must be derived from the files in 0-data.

In practice, that means having the discipline to incorporate data into the loop. Want to add an image from your Downloads folder to a figure in the paper? Add it first to a subdirectory of 0-data. Want to add that nice plot from the workstation into the paper? Make sure to copy the entire pipeline to the 1-analyses directory. And so on.

Documentation

One README per subdirectory

Logical structure, descriptive file names, self-contained flow… they all help. But to really understand what is going on, nothing beats documentation.

For this reason, the third DAFT principle is to add one README per folder. Every folder should have a README file. Create a README whenever you create a new folder and write on it at least one sentence describing what will be stored there. Something as simple as that:

# Dataset name
Description of dataset.

Adding some new datasets? Create a README to describe what kind of data it is. Beginning a new analysis? Create a README to explain what the goal and approach are.

Turn it into a habit: new folder, new README (with some text in it). A short README is better than no README. Even an empty README is better than no README because it nudges you into writing something.

Template

I created a repository with a DAFT paper template with some placeholder folders and files to exemplify the organization. It is so simple that I’m not sure how useful it will be. In any case, you can check it here:

github.com/bruvellu/daft-template
(or Zenodo doi: 10.5281/zenodo.20499287)

Examples

I’ve used the DAFT principles in my last two papers.

The DAFT prototype emerged when writing the brachiopod Wnt paper. At the time, I had no separate analyses folder yet (they were together with data), but the core concepts were there already. Here’s the repository:

github.com/bruvellu/terebratalia-wnts
(or Zenodo doi:10.5281/zenodo.8312022)

DAFT became mature during the cephalic furrow paper. This was, by far, my most complex and long-runing project, with all sorts of data and analyses over many years. The DAFT principles kept me sane until the end. Here’s the repository:

github.com/bruvellu/cephalic-furrow
(or Zenodo doi:10.5281/zenodo.7781947)

Conclusion

I’m curious to know if these principles resonate with others. As I wrote in the beginning, the DAFT principles aren’t novel; numbered directories and READMEs have been a standard in data science for a long time and there are already great similar templates out there (e.g., OSF Open Data Sharing). DAFT’s purpose is to highlight the simplest actions, which anyone, from any field, could adopt, that would most effectively raise, at least a tiny bit, the basal level of reproducibility in research papers.

Citation

Vellutini, B. C. (2026). DAFT: minimal principles for reproducible research papers. Zenodo. https://doi.org/10.5281/zenodo.20499893

5 replies on “DAFT: minimal principles for reproducible research papers”

@blog @tfardet Bookmarked to read later! Thank you for sharing! Love to read about systems to organize information.

Won't be writing any research papers this semester but maybe I can apply this system for my sci. comm. articles writing process 🤔.

Olá Bruno, ótimas dicas!

Outra coisa que pode ser de grande valor é estabelecer informações básicas nas tabelas e outros arquivos (ex, sempre incluir uma aba README e uma aba com as “regras de uso” dessas tabelas). Sobre essas regras, pode-se detalhar o vocabulário e as formas de escrita. Minhas regras básicas para tabelas estão aqui (baseada no critério tidy data; a tabela está em construção) https://docs.google.com/spreadsheets/d/1YkeDGwPyYzZHvwkNTfUt-8Nj8-5hocY8N-wUGcWY_Vc/edit?usp=sharing
Abraços!
maxmaronna

Olá Max! Muito legal a tabela com o vocabulário controlado para tabelas. Gostei de vários padrões e vou adotar para as minhas tabelas futuras. Vai publicar essas recomendações em algum lugar? Acho que seriam bastante úteis para muita gente! Abs, Bruno

Oi Bruno, que legal que gostou das recomendações! Elas são parte de um conjunto de recomendações que estou refinando nos últimos anos, como pastas e tabelas para membros de lab, artigos (bem similar a tua proposta DAFT), ferramentas e outros. Essa daqui é o link geral, onde originalmente está a tabela com as regras de conteúdo que te comentei no meu primeiro comment: https://drive.google.com/drive/folders/1coz5uZczPcdiqEqQ0OvMHmTVxFwFkMne?usp=sharing

Tenho sim interesse em publicar essas recomendações, mesmo que seja na web, mas queria ter algo mais avançado…talvez podemos unir forças e pensar algo em conjunto?
Abs e boa semana!
max
PD Por favor, se achar bacana a ideia, me comenta também para maxmaronna@gmail.com

Reply by Email

or

Leave a Comment

Your email address will not be published. Required fields are marked *