Data model

A recording means little on its own. To interpret, compare or reproduce it, one needs to know which animal or tissue it came from, what was done to it beforehand, where in the brain the electrode or fiber sat, which hardware and reagents were used, what the animal was doing, and under which approval the work was done. In most labs this context is spread over surgery sheets, notebooks, spreadsheets and file names, and much of it leaves with the people who wrote it.

BrainSTEM records this context as linked, structured records in a relational data model. Each record describes one thing: a subject, a procedure, a session, an implanted probe. The links between records carry the scientific relations. An implant procedure creates an experimental interface; a data acquisition names the interfaces it recorded through and so inherits their anatomical target and hardware; a session links the subjects or specimen sets it was performed on. A question such as which mice received a virus injection in CA1 and were later recorded with a silicon probe during a running task becomes a query over records instead of a search through notes.

Three principles shape the model:

  • Shared vocabularies for comparison. Species, strains, brain regions, behavioral paradigms and regulatory authorities come from shared taxonomies; anatomical positions are coordinates in a named atlas; reagents and devices come from a shared catalog, where an entry can carry its RRID. Records from different labs use the same terms.
  • Method-specific detail. Procedures, recordings, manipulations, interfaces, materials and logs have a type, such as a silicon probe implant, a virus injection or two-photon imaging. Each type has its own fields, validated against a versioned JSON schema, so a record holds the parameters that matter for that method.
  • Metadata, not raw data. BrainSTEM describes the experiment and records where the data are stored; the recordings themselves stay in the lab’s storage. Records export as JSON or convert to Neurodata Without Borders (NWB) files for archiving and sharing, for example on DANDI.

Records belong to projects, which decide who can see and edit them, so a lab keeps its work private until it chooses to share or publish it.

The model at a glance

The Overview below is a drawing of the whole model; the Interactive view is the complete current model, copied from the BrainSTEM server’s public reference: every model as a card with its fields, every relation, where each model inherits its permissions from, and the fields of every type. Expand opens it with its search, layouts, layers and detail panel. The same diagram is embedded on each model page, focused on that model, and is available inside BrainSTEM from the Help menu and the Graph tab of every help dialog.

Overview of the BrainSTEM data model: users and groups hold roles on projects; projects own subjects, specimen sets and sessions with their modules; personal attributes are owned and shared by users and groups, like projects; the shared catalog and taxonomies are used by everyone

Click the drawing to see it in full size. It shows the core models; switch to Interactive for the complete model with all fields and relations.

Where do I record it?

What happened decides which kind of entry records it: an action on a subject, an observation over time, a device that stays in place, tissue taken out, or what was measured, delivered or done in a session.

Which kind of entry records what happened: procedures, subject logs, interfaces, specimen sets, data acquisition, manipulations, behaviors, epochs and material usage Which kind of entry records what happened. Each kind has its own page under Organization of the models.

Organization of the models

The model is structured into these main categories:

Expandability, permissions, schemas

  • Expandability: how the model grows through new types, taxonomies and resources while every record stays standardized.
  • Permissions: object-level permissions that inherit from projects, groups and personal attributes.
  • Schemas: the type-specific, versioned JSON schemas behind every modular record.

Example usage of the flexible modular design

The figure below shows how the data model applies to an extracellular recording session during a behavioral experiment in a rat. Colours follow the apps of the interactive data model: the project, subject and session (STEM data) are purple, the procedures, interface and session modules (Modules) teal, and the coordinates, which are fields of a procedure, grey. The implant procedure carries its materials and coordinates and creates the experimental interface that the recording names, so the recording inherits where and with what it was made.

Example: a project with a rat, its silicon probe implant and virus injection with materials and coordinates, the interface the implant created, and a session with an extracellular recording, behavioral tracking and a behavior entry Click the figure to open it at full size.