Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper restriction of merge tables during delete in spikesortingv1 #924

Open
samuelbray32 opened this issue Apr 11, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working merge To do with merge tables spike sorting

Comments

@samuelbray32
Copy link
Collaborator

Describe the bug
When deleting a subset from SpikeSortingSelection in the v1 pipeline, the delete step attempts to delete all entries from SpikeSortingOutput.CurationV1.

Suspect it's a failure to join and restrict tables correctly during the merge delete due to the remapping of primary keys between levels.

To Reproduce

from spyglass.spikesorting.spikesorting_merge import SpikeSortingOutput
import spyglass.spikesorting.v1 as sgs

restr = {"nwb_file_name":"BS2820231107_.nwb", "sort_group_id": 9}
rec_restr = (sgs.SpikeSortingSelection.proj() * (sgs.SpikeSortingRecordingSelection & restr).proj()).fetch('recording_id', as_dict=True) 
del_key = (sgs.SpikeSortingSelection & rec_restr & {"sorter_param_name": "franklab_probe_ctx_30KHz"}).fetch("KEY",as_dict=True)
sgs.SpikeSortingSelection & del_key # gives 6 entries
(sgs.SpikeSortingSelection).delete(del_key) # deletes 6 entries from SpikeSortingSelection, all entries from SpikeSortingOutput.CurationV1
@samuelbray32 samuelbray32 added bug Something isn't working spike sorting merge To do with merge tables labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merge To do with merge tables spike sorting
Projects
None yet
Development

No branches or pull requests

3 participants