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

Add NeuralynxSortingInterface #461

Closed
wants to merge 2 commits into from
Closed

Conversation

garrettmflynn
Copy link
Member

This PR adds the NeuralynxSortingInterface to the allowed interfaces. However, this currently fails on the test data with the following error when attempting to create a stub preview:

Screenshot 2023-10-17 at 11 56 59 AM

Full Error

[main-process]: [2023-10-17 11:55:15,960] ERROR in app: Exception on /neuroconv/convert [POST]
Traceback (most recent call last):
  File "/Users/garrettflynn/Documents/Github/nwb-guide/pyflask/apis/neuroconv.py", line 89, in post
    return convert_to_nwb(neuroconv_api.payload)
  File "/Users/garrettflynn/Documents/Github/nwb-guide/pyflask/manageNeuroconv/manage_neuroconv.py", line 392, in convert_to_nwb
    converter.run_conversion(
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/nwbconverter.py", line 160, in run_conversion
    self.add_to_nwbfile(nwbfile_out, metadata, conversion_options)
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/nwbconverter.py", line 114, in add_to_nwbfile
    data_interface.add_to_nwbfile(
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py", line 316, in add_to_nwbfile
    sorting_extractor = self.subset_sorting()
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py", line 218, in subset_sorting
    [
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py", line 221, in <listcomp>
    for x in [self.sorting_extractor.get_unit_spike_train(y)]
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/spikeinterface/core/basesorting.py", line 110, in get_unit_spike_train
    segment_index = self._check_segment_index(segment_index)
  File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/spikeinterface/core/base.py", line 78, in _check_segment_index
    raise ValueError("Multi-segment object. Provide 'segment_index'")
ValueError: Multi-segment object. Provide 'segment_index'

@garrettmflynn garrettmflynn self-assigned this Oct 17, 2023
@CodyCBakerPhD
Copy link
Collaborator

Ah, I see why this is. We don't test if that interface on that data works in sub mode

It's the subsetting of the spike trains that's causing the problem, because this is the first case of it being used on multi-segment data

@CodyCBakerPhD
Copy link
Collaborator

Will require NeuroConv fix in that case - tabling for now

@garrettmflynn garrettmflynn added the interface Add support for a specific NeuroConv interface / converter label Oct 17, 2023
@CodyCBakerPhD CodyCBakerPhD deleted the neuralynx-sorting branch June 12, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface Add support for a specific NeuroConv interface / converter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants