You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigating restrictions described in #630 requires burying primary keys in table definitions like...
@schemaclassSpikeSortingRecordingSelection(SpyglassMixin, dj.Manual):
definition=""" # Raw voltage traces and parameters. Use `insert_selection` method to insert rows. recording_id: uuid --- -> Raw -> SortGroup -> IntervalList -> SpikeSortingPreprocessingParameters -> LabTeam """
A unique pairing of each secondary key is associated with a uuid so we don't have issues declaring downstream tables.
As a workaround, we've needed helper functions to be able to trace keys up or down through bury tables, as in #910
@schemaclassCurationV1(SpyglassMixin, dj.Manual):
...
@classmethoddefget_sort_group_info(cls, key: dict) ->dj.Table:
"""Returns the sort group information for the curation (e.g. brain region, electrode placement, etc.) Parameters ---------- key : dict restriction on CuratedSpikeSorting table Returns ------- sort_group_info : Table Table with information about the sort groups """table= (
(cls&key) *SpikeSortingSelection()
) *SpikeSortingRecordingSelection().proj(
"recording_id", "sort_group_id"
)
electrode_restrict_list= []
forxintable:
# pull just one electrode from each sort group for infoelectrode_restrict_list.extend(
((SortGroup.SortGroupElectrode() &x) *Electrode).fetch(
limit=1
)
)
sort_group_info= (
(Electrode&electrode_restrict_list)
*table*SortGroup.SortGroupElectrode()
) *BrainRegion()
return (cls&key).proj() *sort_group_info
Does this need to be handled on a case-by-case basis? Could it be generalized?
The text was updated successfully, but these errors were encountered:
I think I have something close to a general solution. It seems able to replicate some of the methods I have in #910.
I'll put together a PR with it. Once I do, @CBroz1 could you help me with detecting alias projections between a parent and a child?
Navigating restrictions described in #630 requires burying primary keys in table definitions like...
A unique pairing of each secondary key is associated with a uuid so we don't have issues declaring downstream tables.
As a workaround, we've needed helper functions to be able to trace keys up or down through bury tables, as in #910
Does this need to be handled on a case-by-case basis? Could it be generalized?
The text was updated successfully, but these errors were encountered: