Back

A motif for domain-specific analysis applets that are easy to learn, reuse, test, and to compose into pipelines: application to vision science

Lepsky, A. A.; Severson, M. K.; Wang, R.; Cheng, X.; Rodriguez, R. L.; Gong, R.; Van Hooser, S. D.

2026-04-30 neuroscience
10.64898/2026.04.27.721136 bioRxiv
Show abstract

Scientific progress depends on the analysis of primary data, yet the small, domain-specific programs that perform most scientific analyses are typically poorly documented, narrowly tested, and difficult to reuse outside the lab that created them. General-purpose pipeline tools address the problem of running steps in order but do not enforce documentation, testing, or standardized outputs. We describe a motif for building domain-specific analysis applets, which we call calculators, that constrains developer choices in order to produce code that is readable, tested, and reusable almost as a byproduct of following the template. Calculators operate on a typed, searchable database of documents, eliminating the need to explicitly wire inputs and outputs together; instead, each calculator searches the database for documents it can operate on and adds its results as new typed documents. Calculators must provide documentation in a standard location, self-tests that can be run and inspected interactively, adjustable input parameters, a single well-defined output document type, and a default plotting method. Sets of calculators compose naturally into pipelines whose outputs satisfy FAIR principles at every stage. We demonstrate the motif by implementing calculators for common analyses in vision science, including orientation and direction selectivity, contrast tuning, spatial and temporal frequency tuning, speed tuning, and Hartley reverse correlation. These calculators have been used in published work and are in active use across collaborating laboratories. We discuss the design principles of the motif, its advantages and limitations, and its applicability to domain-specific computation across neuroscience and beyond. Significance StatementScientists often must write small programs to analyze their own data. These programs are usually poorly documented, lightly tested, and hard for other labs to reuse. Mistakes in this kind of code have even caused well-known papers to be retracted. We describe a simple pattern for writing these programs, which we call a calculator. The pattern requires the programmer to include clear documentation, built-in tests, adjustable settings, and a standard form of output. Calculators work by searching a shared database for data they know how to handle, so many calculators can be chained together into a pipeline without extra setup. We show how this works by building calculators for common visual neuroscience analyses that other labs are already using.

Matching journals

The top 3 journals account for 50% of the predicted probability mass.

1
PLOS Computational Biology
1863 papers in training set
Top 0.8%
24.1%
2
eneuro
439 papers in training set
Top 0.1%
19.9%
3
eLife
5828 papers in training set
Top 12%
8.5%
50% of probability mass above
4
Neuron
337 papers in training set
Top 1%
5.9%
5
Journal of Open Source Software
25 papers in training set
Top 0.1%
3.0%
6
PLOS ONE
5266 papers in training set
Top 41%
2.6%
7
Journal of Vision
110 papers in training set
Top 0.4%
2.6%
8
Wellcome Open Research
67 papers in training set
Top 0.5%
2.3%
9
Nature Methods
385 papers in training set
Top 4%
2.1%
10
Nature
645 papers in training set
Top 6%
1.9%
11
Journal of Neuroscience Methods
122 papers in training set
Top 1%
1.4%
12
Journal of Neurophysiology
302 papers in training set
Top 3%
1.2%
13
Cell Systems
201 papers in training set
Top 3%
1.2%
14
Proceedings of the National Academy of Sciences
2444 papers in training set
Top 33%
1.2%
15
Genome Biology
637 papers in training set
Top 7%
1.2%
16
PLOS Biology
486 papers in training set
Top 7%
1.1%
17
BMC Bioinformatics
457 papers in training set
Top 5%
1.1%
18
Nature Neuroscience
252 papers in training set
Top 5%
1.0%
19
iScience
1154 papers in training set
Top 32%
0.9%
20
Nature Protocols
33 papers in training set
Top 0.4%
0.9%
21
Patterns
78 papers in training set
Top 2%
0.9%
22
Nature Communications
5641 papers in training set
Top 55%
0.9%
23
Molecular Biology of the Cell
311 papers in training set
Top 4%
0.5%
24
Cell Reports Methods
165 papers in training set
Top 5%
0.5%
25
Cell Reports
1498 papers in training set
Top 30%
0.5%
26
Scientific Reports
3612 papers in training set
Top 80%
0.5%