Group#
Adapter for NWB groups to linkml Classes
- pydantic model GroupAdapter#
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
- build() BuildResult #
Make this abstract so it can’t be instantiated directly.
Subclasses call
build_base()
to get the basics true of both groups and datasets
- build_subclasses() BuildResult #
Build nested groups and datasets
Create ClassDefinitions for each, but then also create SlotDefinitions that will be used as attributes linking the main class to the subclasses
- handle_container_group(cls: Group) BuildResult #
Make a special LinkML children slot that can have any number of the objects that are of neurodata_type_inc class
Examples
- name: templates groups: - neurodata_type_inc: TimeSeries doc: TimeSeries objects containing template data of presented stimuli. quantity: '*' - neurodata_type_inc: Images doc: Images objects containing images of presented stimuli. quantity: '*'
- Parameters:
children (List[
Group
]) – Child groups
- handle_container_slot(cls: Group) BuildResult #
Handle subgroups that contain arbitrarily numbered classes,
eg. each of the groups in
Examples
name: trials neurodata_type_inc: TimeIntervals doc: Repeated experimental events that have a logical grouping. quantity: ‘?’
name: invalid_times neurodata_type_inc: TimeIntervals doc: Time intervals that should be removed from analysis. quantity: ‘?’
neurodata_type_inc: TimeIntervals doc: Optional additional table(s) for describing other experimental time intervals. quantity: ‘*’