# Guidelines for data analysis scripts

**Authors:** Marijn van Vliet

arXiv: 1904.06163 · 2019-08-12

## TL;DR

This paper provides practical guidelines for organizing data analysis scripts to improve clarity, reproducibility, and error reduction in complex data pipelines, especially in neuroscience research.

## Contribution

It introduces a set of clear, actionable guidelines for structuring analysis code and demonstrates their application through a detailed case study.

## Key findings

- Enhanced reproducibility of analysis pipelines
- Reduced errors in data analysis processes
- Improved clarity and maintainability of code

## Abstract

Unorganized heaps of analysis code are a growing liability as data analysis pipelines are getting longer and more complicated. This is worrying, as neuroscience papers are getting retracted due to programmer error. In this paper, some guidelines are presented that help keep analysis code well organized, easy to understand and convenient to work with:   1. Each analysis step is one script   2. A script either processes a single recording, or aggregates across recordings, never both   3. One master script to run the entire analysis   4. Save all intermediate results   5. Visualize all intermediate results   6. Each parameter and filename is defined only once   7. Distinguish files that are part of the official pipeline from other scripts   In addition to discussing the reasoning behind each guideline, an example analysis pipeline is presented as a case study to see how each guideline translates into code.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.06163/full.md

## Figures

2 figures with captions in the complete paper: https://tomesphere.com/paper/1904.06163/full.md

## References

29 references — full list in the complete paper: https://tomesphere.com/paper/1904.06163/full.md

---
Source: https://tomesphere.com/paper/1904.06163