Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion +types/+core/ElectrodeGroup.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef ElectrodeGroup < types.core.NWBContainer & types.untyped.GroupClass
% ELECTRODEGROUP - A physical grouping of electrodes, e.g. a shank of an array.
% ELECTRODEGROUP - A physical grouping of electrodes, e.g., a shank of an array. An electrode group is typically used to describe electrodes that are physically connected on a single device and are often (but not always) used together for analysis, such as for spike sorting. Note that this is descriptive metadata; electrodes from different groups can still be spike-sorted together if needed.
%
% Required Properties:
% description, device, location
Expand Down
26 changes: 14 additions & 12 deletions +types/+core/ElectrodesTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
group_name; % (VectorData) Name of the ElectrodeGroup this electrode is a part of.
imp; % (VectorData) Impedance of the channel, in ohms.
reference; % (VectorData) Description of the reference electrode and/or reference scheme used for this electrode, e.g., "stainless steel skull screw" or "online common average referencing".
rel_x; % (VectorData) x coordinate in electrode group
rel_y; % (VectorData) y coordinate in electrode group
rel_z; % (VectorData) z coordinate in electrode group
x; % (VectorData) x coordinate of the channel location in the brain (+x is posterior).
y; % (VectorData) y coordinate of the channel location in the brain (+y is inferior).
z; % (VectorData) z coordinate of the channel location in the brain (+z is right).
rel_x; % (VectorData) x coordinate in electrode group. Units should be specified in microns.
rel_y; % (VectorData) y coordinate in electrode group. Units should be specified in microns.
rel_z; % (VectorData) z coordinate in electrode group. Units should be specified in microns.
x; % (VectorData) x coordinate of the channel location in the brain (+x is posterior). Units should be specified in microns.
y; % (VectorData) y coordinate of the channel location in the brain (+y is inferior). Units should be specified in microns.
z; % (VectorData) z coordinate of the channel location in the brain (+z is right). Units should be specified in microns.
end

methods
Expand Down Expand Up @@ -50,21 +50,23 @@
%
% - location (VectorData) - Location of the electrode (channel). Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - reference (VectorData) - Description of the reference electrode and/or reference scheme used for this electrode, e.g., "stainless steel skull screw" or "online common average referencing".
%
% - rel_x (VectorData) - x coordinate in electrode group
% - rel_x (VectorData) - x coordinate in electrode group. Units should be specified in microns.
%
% - rel_y (VectorData) - y coordinate in electrode group
% - rel_y (VectorData) - y coordinate in electrode group. Units should be specified in microns.
%
% - rel_z (VectorData) - z coordinate in electrode group
% - rel_z (VectorData) - z coordinate in electrode group. Units should be specified in microns.
%
% - vectordata (VectorData) - Vector columns, including index columns, of this dynamic table.
%
% - x (VectorData) - x coordinate of the channel location in the brain (+x is posterior).
% - x (VectorData) - x coordinate of the channel location in the brain (+x is posterior). Units should be specified in microns.
%
% - y (VectorData) - y coordinate of the channel location in the brain (+y is inferior).
% - y (VectorData) - y coordinate of the channel location in the brain (+y is inferior). Units should be specified in microns.
%
% - z (VectorData) - z coordinate of the channel location in the brain (+z is right).
% - z (VectorData) - z coordinate of the channel location in the brain (+z is right). Units should be specified in microns.
%
% Output Arguments:
% - electrodesTable (types.core.ElectrodesTable) - A ElectrodesTable object
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/ExperimentalConditionsTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - repetitions (DynamicTableRegion) - A reference to one or more rows in the RepetitionsTable table.
%
% - repetitions_index (VectorIndex) - Index dataset for the repetitions column.
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/FrequencyBandsTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - vectordata (VectorData) - Vector columns, including index columns, of this dynamic table.
%
% Output Arguments:
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/IntracellularElectrodesTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - vectordata (VectorData) - Vector columns, including index columns, of this dynamic table.
%
% Output Arguments:
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/IntracellularRecordingsTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - responses (IntracellularResponsesTable) - Table for storing intracellular response related metadata.
%
% - stimuli (IntracellularStimuliTable) - Table for storing intracellular stimulus related metadata.
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/IntracellularResponsesTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - response (TimeSeriesReferenceVectorData) - Column storing the reference to the recorded response for the recording (rows)
%
% - vectordata (VectorData) - Vector columns, including index columns, of this dynamic table.
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/IntracellularStimuliTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - stimulus (TimeSeriesReferenceVectorData) - Column storing the reference to the recorded stimulus for the recording (rows).
%
% - stimulus_template (TimeSeriesReferenceVectorData) - Column storing the reference to the stimulus template for the recording (rows).
Expand Down
19 changes: 17 additions & 2 deletions +types/+core/NWBFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

% READONLY PROPERTIES
properties(SetAccess = protected)
nwb_version = "2.9.0"; % (char) File version string. Use semantic versioning, e.g. 1.2.1. This will be the name of the format with trailing major, minor and patch numbers.
nwb_version = "2.10.0-alpha"; % (char) File version string. Use semantic versioning, e.g. 1.2.1. This will be the name of the format with trailing major, minor and patch numbers.
end
% REQUIRED PROPERTIES
properties
Expand All @@ -27,6 +27,7 @@
general_devices_models; % (DeviceModel) Data acquisition device models.
general_experiment_description; % (char) General description of the experiment.
general_experimenter; % (char) Name of person(s) who performed the experiment. Can also specify roles of different people involved.
general_external_resources; % (HERD) This is the HERD structure for this specific NWBFile, storing the mapped external resources.
general_extracellular_ephys; % (ElectrodeGroup) Physical group of electrodes.
general_extracellular_ephys_electrodes; % (ElectrodesTable) A table of all electrodes (i.e. channels) used for recording. Changed in NWB 2.9.0 to use the newly added ElectrodesTable neurodata type instead of a DynamicTable with added columns.
general_institution; % (char) Institution(s) where experiment was performed.
Expand Down Expand Up @@ -94,6 +95,8 @@
%
% - general_experimenter (char) - Name of person(s) who performed the experiment. Can also specify roles of different people involved.
%
% - general_external_resources (HERD) - This is the HERD structure for this specific NWBFile, storing the mapped external resources.
%
% - general_extracellular_ephys (ElectrodeGroup) - Physical group of electrodes.
%
% - general_extracellular_ephys_electrodes (ElectrodesTable) - A table of all electrodes (i.e. channels) used for recording. Changed in NWB 2.9.0 to use the newly added ElectrodesTable neurodata type instead of a DynamicTable with added columns.
Expand Down Expand Up @@ -179,7 +182,7 @@
% Output Arguments:
% - nWBFile (types.core.NWBFile) - A NWBFile object

varargin = [{'nwb_version' '2.9.0'} varargin];
varargin = [{'nwb_version' '2.10.0-alpha'} varargin];
obj = obj@types.core.NWBContainer(varargin{:});


Expand All @@ -196,6 +199,7 @@
addParameter(p, 'general_devices_models',types.untyped.Set());
addParameter(p, 'general_experiment_description',[]);
addParameter(p, 'general_experimenter',[]);
addParameter(p, 'general_external_resources',[]);
addParameter(p, 'general_extracellular_ephys',types.untyped.Set());
addParameter(p, 'general_extracellular_ephys_electrodes',[]);
addParameter(p, 'general_institution',[]);
Expand Down Expand Up @@ -248,6 +252,7 @@
obj.general_devices_models = p.Results.general_devices_models;
obj.general_experiment_description = p.Results.general_experiment_description;
obj.general_experimenter = p.Results.general_experimenter;
obj.general_external_resources = p.Results.general_external_resources;
obj.general_extracellular_ephys = p.Results.general_extracellular_ephys;
obj.general_extracellular_ephys_electrodes = p.Results.general_extracellular_ephys_electrodes;
obj.general_institution = p.Results.general_institution;
Expand Down Expand Up @@ -326,6 +331,9 @@
function set.general_experimenter(obj, val)
obj.general_experimenter = obj.validate_general_experimenter(val);
end
function set.general_external_resources(obj, val)
obj.general_external_resources = obj.validate_general_external_resources(val);
end
function set.general_extracellular_ephys(obj, val)
obj.general_extracellular_ephys = obj.validate_general_extracellular_ephys(val);
end
Expand Down Expand Up @@ -496,6 +504,9 @@ function postset_general_source_script_file_name(obj)
val = types.util.checkDtype('general_experimenter', 'char', val);
types.util.validateShape('general_experimenter', {[Inf]}, val)
end
function val = validate_general_external_resources(obj, val)
val = types.util.checkDtype('general_external_resources', 'types.hdmf_common.HERD', val);
end
function val = validate_general_extracellular_ephys(obj, val)
namedprops = struct();
constrained = {'types.core.ElectrodeGroup'};
Expand Down Expand Up @@ -702,6 +713,10 @@ function postset_general_source_script_file_name(obj)
end
end
io.writeGroup(fid, [fullpath '/general']);
if ~isempty(obj.general_external_resources)
refs = obj.general_external_resources.export(fid, [fullpath '/general/external_resources'], refs);
end
io.writeGroup(fid, [fullpath '/general']);
if ~isempty(obj.general_extracellular_ephys)
refs = obj.general_extracellular_ephys.export(fid, [fullpath '/general/extracellular_ephys'], refs);
end
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/PlaneSegmentation.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
%
% - imaging_plane (ImagingPlane) - Link to ImagingPlane object from which this data was generated.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - pixel_mask (VectorData) - Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation. At least one of `image_mask`, `pixel_mask`, or `voxel_mask` is required.
%
% - pixel_mask_index (VectorIndex) - Index into pixel_mask.
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/RepetitionsTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - sequential_recordings (DynamicTableRegion) - A reference to one or more rows in the SequentialRecordingsTable table.
%
% - sequential_recordings_index (VectorIndex) - Index dataset for the sequential_recordings column.
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/SequentialRecordingsTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - simultaneous_recordings (DynamicTableRegion) - A reference to one or more rows in the SimultaneousRecordingsTable table.
%
% - simultaneous_recordings_index (VectorIndex) - Index dataset for the simultaneous_recordings column.
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/SimultaneousRecordingsTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - recordings (DynamicTableRegion) - A reference to one or more rows in the IntracellularRecordingsTable table.
%
% - recordings_index (VectorIndex) - Index dataset for the recordings column.
Expand Down
4 changes: 2 additions & 2 deletions +types/+core/Subject.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

% OPTIONAL PROPERTIES
properties
age; % (char) Age of subject. Can be supplied instead of 'date_of_birth'.
age; % (char) Age of subject. Can be supplied instead of 'date_of_birth'. The ISO 8601 Duration format is recommended, e.g., 'P90D' for 90 days old. If the precise age is unknown, an age range can be given by '[lower bound]/[upper bound]' e.g. 'P10D/P20D' would mean that the age is in between 10 and 20 days. If only the lower bound is known, then including only the slash after that lower bound can be used to indicate a missing bound. For instance, 'P90Y/' would indicate that the age is 90 years or older.
age_reference = "birth"; % (char) Age is with reference to this event. Can be 'birth' or 'gestational'. If reference is omitted, 'birth' is implied.
date_of_birth; % (datetime) Date of birth of subject. Can be supplied instead of 'age'.
description; % (char) Description of subject and where subject came from (e.g., breeder, if animal).
Expand All @@ -29,7 +29,7 @@
% subject = types.core.SUBJECT(Name, Value) creates a Subject object where one or more property values are specified using name-value pairs.
%
% Input Arguments (Name-Value Arguments):
% - age (char) - Age of subject. Can be supplied instead of 'date_of_birth'.
% - age (char) - Age of subject. Can be supplied instead of 'date_of_birth'. The ISO 8601 Duration format is recommended, e.g., 'P90D' for 90 days old. If the precise age is unknown, an age range can be given by '[lower bound]/[upper bound]' e.g. 'P10D/P20D' would mean that the age is in between 10 and 20 days. If only the lower bound is known, then including only the slash after that lower bound can be used to indicate a missing bound. For instance, 'P90Y/' would indicate that the age is 90 years or older.
%
% - age_reference (char) - Age is with reference to this event. Can be 'birth' or 'gestational'. If reference is omitted, 'birth' is implied.
%
Expand Down
2 changes: 2 additions & 0 deletions +types/+core/SweepTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
%
% - id (ElementIdentifiers) - Array of unique identifiers for the rows of this dynamic table.
%
% - meanings_tables (MeaningsTable) - MeaningsTable objects that provide meanings for values in VectorData columns within this DynamicTable. Tables should be named according to the column they provide meanings for with a "_meanings" suffix. e.g., if a VectorData column is named "stimulus_type", the corresponding MeaningsTable should be named "stimulus_type_meanings".
%
% - series (VectorData) - The PatchClampSeries with the sweep number in that row.
%
% - series_index (VectorIndex) - Index for series.
Expand Down
Loading
Loading