Avraham A Lepsky, Madeline K Severson, Ruyang Wang +4·Published Oct 15, 2026·doi.org/10.63884/ndic.2026.i1iqjm6a
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 (Findable, Accessible, Interoperable, Reusable) 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. The implementation also provides a graphical interface, so that a user can assemble a pipeline, set its parameters, and run it over a session without writing code. We discuss the design principles of the motif, its advantages and limitations, and its applicability to domain-specific computation across neuroscience and beyond. THIS DATASET CONTAINS TWO EXAMPLE SESSIONS TO DEMONSTRATE THE CALCULATOR COMPUTATIONS.
NIH MH114678
6acfaec58756f8d8d66f67a9