DataJoint Elements: Data Workflows for Neurophysiology

Dimitri Yatsenko, Thinh Nguyen, Shan Shen, Kabilar Gunalan, Christopher A. Turner, Raphaël Guzman, Maho Sasaki, Daniel Sitonic, Jacob Reimer, Edgar Y. Walker, Andreas S. ToliasbioRxiv 2021

Abstract: A new resource—DataJoint Elements—provides modular designs for assembling complete workflow solutions to organize data and computations for common neurophysiology experiments. The designs are derived from working solutions developed in leading research groups using the open-source DataJoint framework to integrate data collection and analysis in collaborative workflows.

Introduction

Modern neurophysiology is increasingly data-intensive, with high-density probes and sophisticated imaging techniques generating terabytes of complex, multi-modal data. Traditionally, labs have managed this complexity by developing project-specific scripts to organize data and trigger analyses. However, this "reinventing the wheel" approach often leads to messy, non-reproducible code and fails to bridge the "FAIR" gap—ensuring data is Findable, Accessible, Interoperable, and Reusable—during the active phase of research.

Challenges in the field and the corresponding solutions provided by DataJoint and DataJoint Elements.

DataJoint Elements addresses these challenges by providing a middle ground between custom scripts and rigid, one-size-fits-all software. It offers modular, standardized "building blocks" for neurophysiology data pipelines, allowing researchers to focus on science rather than database engineering.

Methods and System Architecture

The project is built on the DataJoint framework, an open-source library for Python and MATLAB that interfaces with relational databases like MySQL.

The DataJoint ecosystem, integrating experimental data entry, analysis workflows, and data infrastructure.

Key Technical Features

  • Relational Data Modeling: Instead of flat files in folders, data is stored in tables with strictly defined relationships, ensuring referential integrity.
  • Directed Acyclic Graphs (DAGs): Workflows are modeled as DAGs where each node represents a table and its corresponding code. This allows the system to automatically track computational dependencies; if a preprocessing parameter is changed, the system identifies exactly which downstream analyses require re-computation.
  • Modularity: Elements are simplified versions of successful pipelines used by major consortia (e.g., the International Brain Lab). They are designed to be "plug-and-play," allowing labs to combine modules for different modalities (like ephys and behavior) without starting from scratch.
  • Distributed Computing: A built-in job reservation system facilitates spreading heavy computations, such as spike sorting, across multiple server nodes.

Supported Data Modalities

As a software architecture, DataJoint Elements provides the infrastructure to handle the most common data types in the field:

  • Electrophysiology: Support for Neuropixels (1.0 and 2.0) via tools like SpikeGLX and OpenEphys, with automated spike sorting using Kilosort.
  • Calcium Imaging: Support for 2-photon and Miniscope data, integrating popular analysis packages like Suite2p and CaImAn.
  • Metadata: Standardized schemas for Lab, Animal (including genotyping), and Session information.

Key Insights: Separation of Concerns

The paper argues for a clear division between four layers: Experiment Workflow, Data Science, Data Engineering, and IT Infrastructure. DataJoint Elements specifically targets the Data Engineering layer, which is often the primary bottleneck for research labs.

Furthermore, while most FAIR initiatives focus on sharing data after publication, DataJoint focuses on maintaining data integrity (entity, referential, and compositional) during the experiment. By formalizing the data pipeline into a graph, the workflow itself becomes a shareable, reproducible scientific product.

Results and Future Roadmap

The authors have released several functional modules available on GitHub, including element-array-ephys, element-calcium-imaging, and core metadata modules. These tools are already being used by major neuroscience consortia, proving their scalability from single-laptop setups to multi-lab collaborations.

Future work includes expanding the library to support trial-based behavior, pose estimation (e.g., DeepLabCut), optogenetics, and automated export tools to package pipelines directly into public archives like DANDI, completing the FAIR lifecycle.

Summary updated

BibTeX
@misc{yatsenko2021datajoint,
  author = {Dimitri Yatsenko and Thinh Nguyen and Shan Shen and Kabilar Gunalan and Christopher A. Turner and Raphaël Guzman and Maho Sasaki and Daniel Sitonic and Jacob Reimer and Edgar Y. Walker and Andreas S. Tolias},
  title = {{DataJoint Elements: Data Workflows for Neurophysiology}},
  year = {2021},
  doi = {10.1101/2021.03.30.437358},
  howpublished = {bioRxiv},
}
Figure