-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Feature]: Anatomical annotation of units in spike sorting? #1064
Comments
Hi, the most straightforward way would be to do the following from neuroconv.tools.testing import MockSortingInterface
# Here use your KiloSortSortingInterface instead
interface = MockSortingInterface()
key = "brain_area"
interface.sorting_extractor.set_property(key=key, values=["Hippocampus", "CA1", "Motor Cortex", "Another Location"])
nwbfile_path = "test.nwb"
interface.run_conversion(nwbfile_path=nwbfile_path, overwrite=True)
from pynwb import NWBHDF5IO
with NWBHDF5IO(nwbfile_path, 'r') as io:
nwbfile = io.read()
units_table_df = nwbfile.units.to_dataframe()
units_table_df Are you also writing a raw ecephys data? If so, the "best" way would be to annotate the channels/electrodes in the electrodes table and then make a reference from the units table there. |
Well that was another question I was about to ask :) Am I correct in thinking that by looking at the RecordingEstractorImage there is no way to link the bulk of the raw data as I do for the video recordings? I would like to bundle everything together in a single nwb file, but I was wondering if I could keep those ~100 GBs out of it, as lab policy is still not deleting OEphys source data even after succesfull nwb import. |
No, unless your original data is in hdf5 but that is not dandi friendly and introduces more complexity in your workflow as you need to be sure to keep the paths aligned: https://pynwb.readthedocs.io/en/stable/tutorials/advanced_io/plot_linking_data.html Did the annotation method above worked for you? |
YEs it does! thank you very much :) And thanks for the clarification! |
What would you like to see added to NeuroConv?
I am sorry if I missed this feature. I am using the
KiloSortSortingInterface
to load some units sorted using KS4 viaspikeinterface
.For each unit, I also have a pipeline that produces the brain area where the unit is located. I am wondering what is the way you would recommend to include that information in the sorting data. Is this something advisable? What would be a
neuroconv
-itonic way of doing it?Is your feature request related to a problem?
No response
Do you have any interest in helping implement the feature?
Yes.
Code of Conduct
The text was updated successfully, but these errors were encountered: