-
Notifications
You must be signed in to change notification settings - Fork 45
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
Spike sorting v1 pipeline #651
Conversation
…nto spikesorting_v1
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
…nto spikesorting_v1
Co-authored-by: Chris Brozdowski <[email protected]>
Co-authored-by: Chris Brozdowski <[email protected]>
Thanks @CBroz1 @edeno @samuelbray32 for the comments. I have incorporated as many suggested changes as I could, except for some that threw errors (I reverted those back) and those that were outdated and could not be applied (e.g. the insert sort group by shank function). But otherwise I think this is ready to be merged. The code can obviously be optimized further but I say let's go for it and worry about that later! |
Add new sub-package called
v1
withinspikesorting
that contains the following modules:recording.py
artifact.py
sorting.py
curation.py
metric_curation.py
figurl_curation.py
Also add the following modules in the
spikesorting
package:imported.py
merge.py
General
spikesorting_v1_modulename
~Parameters
~Parameter
)make
methods to have the following structure:classmethod
neuroconv
to installation requirement (needed to write recording to NWB)Module-specific
recording.py
SortGroup
Session
foreign key from primary to secondary keySortGroup.set_group_by_electrode_group
SortGroup.set_reference_from_list
SortGroup.get_geometry
SortInterval
IntervalList
insteadSpikeSortingPreprocessingParameter
dj.Lookup
contents
property of the tableSpikeSortingRecording
recording_id
as the sole primary key; move other attributes that used to be primary key to secondarySpikeSortingRecording.get_recording
methodartifact.py
ArtifactDetectionParameter
dj.Lookup
contents
propertyArtifactRemovedIntervalList
ArtifactInterval
ArtifactRemovedInterval
artifact_id
IntervalList
and interval_list_name is same as artifact_idsorting.py
SpikeSorterParameter
dj.Lookup
SpikeSortingSelection
IntervalList
for artifact-free sorting intervalSpikeSorting
SPYGLASS_SORTING_DIR
SPYGLASS_SORTING_DIR
curation.py
Curation
parent_curation_id
,merges_applied
, and foreign key fromAnalysisNwbfile
dj.Manual
table but usinginsert_curation
method is recommended to populate the table; this function saves the sorting and curation information in NWBinsert_curation
get_recording
get_sorting
get_merged_sorting
: differs fromget_sorting
in that it applies merge groups to the sortingmetric_curation.py
spikesorting_curation.py
to hereMetricCuration
figurl_curation.py
curation_uri.json
each time. This contains the curation labels and merge groups to be shown in the figURL.FigURLCurationSelection
metrics_figurl
as primary key; specifies which metrics to include in the figURLgenerate_curation_uri
method, which can be used to prepopulate the curation labels or merge groups from previous curation in the new figURLFigURLCuration
url
To do
spikeinterface.WaveformExtractor
fromMetricCuration
tablepynwb.units
requires the unit ID to beint
;sortingview
requires unit IDs to bestr
;spikeinterface
allows them to be either type. Write tests to make sure these conventions are respected.