flatironinstitute / neurosift

Browser-based NWB visualization and DANDI exploration
Apache License 2.0
39 stars 4 forks source link

Show `DynamicTableRegion` column as a link? #175

Open weiglszonja opened 4 weeks ago

weiglszonja commented 4 weeks ago

The EventsTable is from ndx-events extension which has a DynamicTableRegion column named event_type that links to the EventTypesTable containing the id and description for each event. Currently the view of this table is showing the event_type as integer value, would it be possible to show it as a link to the other table?

Screenshots:

Screenshot 2024-06-04 at 11 16 54 Screenshot 2024-06-04 at 11 09 39

File: https://neurosift.app/?p=/nwb&url=https://api.dandiarchive.org/api/assets/a07e739d-6246-4f76-8649-9a345cfbdda7/download/&dandisetId=001038&dandisetVersion=draft&tab=neurodata-item:/processing/behavior/WheelEvents|EventsTable

weiglszonja commented 4 weeks ago

Might be connected to #168

magland commented 4 weeks ago

I'm trying to wrap my head around how neurosift would know to do this in this particular case. Would it need to look at the specification for ndx-events extension? That's gets somewhat tricky.

weiglszonja commented 4 weeks ago

Can it just access the table the DynamicTableRegion references? @bendichter any ideas here?

bendichter commented 4 weeks ago

This is not specific to the ndx-events extension. It happens all over NWB. All DynamicTableRegion columns have an attribute table, which is a reference to the table that it is indexing. The same thing happens when you have a units table that points to an electrodes table.

bendichter commented 4 weeks ago

This also comes up a lot in intracellular electrophysiology tables