Notes
| Dataset structure
Each calcium imaging data and corresponding metadata were packaged in the Neurodata Without Borders: Neurophysiology version 2.0 (NWB:N 2.0) data format using the NeuroConv Python package. A single NWB file was created from each data file. NWB files were placed in folders based on the calcium indicator used (GCaMP6s or GCaMP6f), and whether it was a spontaneous measurement or electrical stimulation was performed during calcium imaging. The filename of the NWB file (identifier; e.g., Mouse3_V1_stimulation_x) was constructed by concatenating the identifier of the animal, the targeted brain area (V1) and the type of the recording (stimulation/spontaneous). For each NWB file, we also included a video file in AVI format showing the calcium activity with the same frame rate as they were collected (with the exception of spontaneous data which is shown at a 3x speed).
The CSV file named "Subject_characteristics" contains information about the animals used for calcium imaging such as the species, weight, sex, age or genotype. The "Recording_characteristics" CSV file lists several useful properties for each NWB file including the file size, the duration of the measurement, the targeted cortical area, the imaging depth or the stimulus parameters (e.g., current amplitude, stimulation frequency, pulse duration or number of stimulation trials).
NWB file structure
Each NWB file contains several main groups (which are similar to directories). The acquisition group contains the raw calcium imaging data (TwoPhotonSeries’) in a compressed form. The general group contains metadata about the experiments and consists of several subgroups, related to the two-photon microscope used (‘general/devices/Microscope’), calcium imaging parameters ('general/optophysiology) and subjects of the experiments (‘general/subject’). Former subgroups carry information about the two-photon microscope setup, the imaged brain area and the properties of calcium imaging, while the latter contains metadata about the animal (e.g., species, genotype, subject ID, or weight). The stimulus parameters are described in the stimulus field of the general group.
Interacting with NWB files
After downloading, the structure of NWB files can be explored using the HDFView software.Neurosift can be used to open NWB files in a browser and explore their contents using the download URL of the selected data file (e.g. https://science-data.hu/api/access/datafile/17276): https://flatironinstitute.github.io/neurosift/?p=/nwb&url=FILE_URL https://flatironinstitute.github.io/neurosift/?p=/nwb&url=https://science-data.hu/api/access/datafile/17276 Users can import data from NWB files offline using the PyNWB and MatNWB APIs, or using SpikeInterface. Here we provide an example on how users can import data from NWB files using the MATLAB-based MatNWB API.
Loading a single frame of raw calcium data: 1. nwb = nwbRead('Mouse4_V1_stimulation_1.nwb'); 2. frame = nwb.acquisition.get('TwoPhotonSeries').data.load([1,1,1],[512,512,1]); It is important to note that TwoPhotonSeries data types in NWB files are stored with frames (time) in the first dimension and frame size (512 x 512) in the second and third dimensions, but dimensions are reversed in MatNWB (i.e., the time/frame is stored in the third dimension).
We also provide a Matlab script ("NWB_tutorial_script.m") which can be used to load and visualize files in the dataset using MatNWB.
|